You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploying this service is a short two step process. This assumes you already have a server with an OS of your choice that runs Node setup, if not refer to the [acquiring a server](#acquiring-a-server) section.
4
+
5
+
1. Upload the files of the service to your server and start the service
6
+
2. Setup `nginx` as a reverse proxy to make your service publicy accessible
7
+
8
+
This is what my `nginx` conf looks like in `/etc/nginx/sites-available/default`:
9
+
10
+
```nginx
11
+
server {
12
+
listen 80;
13
+
server_name yourserver.com;
14
+
15
+
location ~^.*$ {
16
+
proxy_set_header X-Real-IP $remote_addr;
17
+
proxy_set_header X-Forwarded-For $remote_addr;
18
+
proxy_set_header Host $host;
19
+
proxy_pass http://localhost:3000;
20
+
}
21
+
}
22
+
```
23
+
24
+
(note that I have no idea what I'm doing here, this was copied from [this tutorial](https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-reverse-proxy-for-apache))
25
+
26
+
## Acquiring a server
27
+
28
+
If you don't have a server to deploy this on just yet, here is what I do:
29
+
30
+
I use and like [DigitalOcean](https://m.do.co/c/d371ed7f99af) (referral link) for my servers. A simple, 5$/month droplet will suffice to run this service reliably. (upgrading to more power in case of big traffic is two clicks away too)
31
+
32
+
Make sure to choose the `NodeJS x.x.x on 16.04` (where `x.x.x` is the highest version number you can find) one-click app when creating the droplet to get the server fully setup with Node and Ubuntu.
0 commit comments