Files
freeplanet_serverside/README.md
2022-09-14 19:15:20 +02:00

70 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Freeplanet_serverside
- Node JS (ver. 16.14.0 or up)
## Install the dependencies
```bash
yarn
```
### Start the app in development mode (hot-code reloading, error reporting, etc.)
```bash
node src/server/server.js
```
### Creating the ambient test
Create your .env.test file copying from .env.development
```bash
cp .env.development .env.test
```
And modifying the file with your configuration
### Certificates
Once you have gone through the process of getting your Lets Encrypt certificates you will have 4 certificates:
```bash
cert.pem
chain.pem
fullchain.pem
privkey.pem
```
You will need to download the root certificate (root.pem) and an intermediate certificate (chain.pem) from Lets Encrypt https://letsencrypt.org/certificates/
See this article:
https://www.psclistens.com/insight/blog/enabling-a-nodejs-ssl-webserver-using-let-s-encrypt-pem-certificates/
and this, for the client:
https://smallstep.com/hello-mtls/doc/combined/nodejs/axios
To see if all the certificates are OK, see this page check and enter the correct host and port:
https://decoder.link/sslchecker
For example:
https://decoder.link/sslchecker/test.freeplanet.app/3001
### Build the ambient test
```bash
./deploynodejs_on_test.js
```
### Creating the ambient Production
Create your .env.production file copying from .env.development
```bash
cp .env.development .env.production
```
And modifying the file with your configuration
### Build the production
```bash
./deploynodejs_on_production.js
```