Skip to content

Commit

Permalink
fix deployment on railway
Browse files Browse the repository at this point in the history
  • Loading branch information
kerolloz committed Jun 16, 2023
1 parent c8081fe commit 370342c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
20 changes: 3 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<a target="_blank" href="https://fastify.io">
<img alt="fastify" align="right" src="https://t.ly/0o1a"/>
</a>
<a target="_blank" href="https://deta.sh">
<img alt="Deta" align="right" src="https://t.ly/-g08" />
<a target="_blank" href="https://railway.app/">
<img alt="Railway" align="right" src="https://t.ly/f5Sa" />
</a>
</h1>

Expand Down Expand Up @@ -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 <https://kounter.tk>.

Also feel free to deploy it to your own Deta account by clicking the button below.
<a href="https://go.deta.dev/deploy?repo=https://github.com/kerolloz/kounter">
<img width="15%" alt="Deta Deploy Button" src="https://button.deta.dev/1/svg" />
</a>

<sub>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).</sub>
```
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 370342c

Please sign in to comment.