Update README to clarify server start instructions for Digital Ocean deployment
Removed instructions for starting the server and updated environment variable section.
This commit is contained in:
18
README.md
18
README.md
@@ -92,14 +92,14 @@ npm install
|
|||||||
|
|
||||||
```
|
```
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
PORT=3000
|
|
||||||
|
# --------- example contents ---------
|
||||||
|
# UDP_PORT=33333
|
||||||
|
# HTTP_PORT=3333
|
||||||
|
# ------------------------------------
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running the Server
|
## Digital Ocean Deployment details
|
||||||
|
1. The Node server is installed to `/opt/netstar-categorizer`
|
||||||
To start the UDP server, use the following command:
|
2. Rather than using `npm start` (which doesn't restart after a crash) the we use **[PM2](https://pm2.keymetrics.io/)**, which provides a more robust runtime
|
||||||
|
3. The full command to start the server using pm2 is `pm2 start npm --name "netstar-categorizer" --cwd /opt/netstar-categorizer/ -- start` - for convenience, there's a `run-me.sh` script in `/root` that will execute this command.
|
||||||
```
|
|
||||||
npm start
|
|
||||||
```
|
|
||||||
This will run the server and bind it to the port specified in your .env file.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user