From 370342c2e0e10740c03d1f7577520bc52a365f95 Mon Sep 17 00:00:00 2001 From: Kerollos Magdy Date: Fri, 16 Jun 2023 20:46:42 +0300 Subject: [PATCH] fix deployment on railway --- README.md | 20 +++----------------- index.js | 3 ++- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index a038b54..1597673 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ fastify - - Deta + + Railway @@ -84,18 +84,4 @@ $ curl -X GET https://kounter.tk/count/xyz "count": 1, "key": "xyz" } -``` - ---- - -### Deployment - -Kounter is powered by [Deta](https://deta.sh). -You are more than welcome to use my version at . - -Also feel free to deploy it to your own Deta account by clicking the button below. - - Deta Deploy Button - - -This service is provided for free thanks to [Deta Micros](https://docs.deta.sh/docs/micros/about) and [Deta Base](https://docs.deta.sh/docs/base/about). +``` \ No newline at end of file diff --git a/index.js b/index.js index c8f5944..7847ef5 100644 --- a/index.js +++ b/index.js @@ -68,7 +68,8 @@ app.get("/badge/:key", async (request, reply) => { } }); -app.listen({ port: process.env.PORT || 3000 }, (err) => { +const port = process.env.PORT || 3000; +app.listen({ port, host: "0.0.0.0" }, (err) => { if (err) { console.error(err); process.exit(1);