Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ MongoDB is installed directly on the VM and only listens on `127.0.0.1`, so it c

### How to start the backend if it stops

On the VM, the backend runs in pm2 under the name `plants-backend`, as the user `alexajah`, from `/home/alexajah/T03-Project-2/backend`. pm2 restarts it if it crashes or the VM reboots.
On the VM, the backend runs in pm2 under the name `iloveplants-backend`, as the user `alexajah`, from `/home/alexajah/T03-Project-2/backend`. pm2 restarts it if it crashes or the VM reboots.

Log in with:

Expand All @@ -127,8 +127,8 @@ ssh <ntnu-username>@it2810-03.idi.ntnu.no
If you are not `alexajah`, put `sudo -u alexajah` in front of the pm2 commands, since pm2 only shows the processes of the user who started them.

```bash
pm2 list # is plants-backend online?
pm2 restart plants-backend # start it again if it is not
pm2 list # is iloveplants-backend online?
pm2 restart iloveplants-backend # start it again if it is not
```

If the logs show that the backend cannot connect to MongoDB, the database has stopped and must be started before the backend is restarted.
Expand Down
4 changes: 2 additions & 2 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "backend",
"name": "iloveplants-backend",
"version": "1.0.0",
"description": "GraphQL-backend for I <3 Plants (Apollo Server + MongoDB)",
"main": "dist/server.js",
Expand Down
Loading