Development of this project has migrated! https://github.com/cecomp-rp/site
- NodeJS: https://nodejs.org/en/ (LTS version)
- Git: https://git-scm.com/downloads (of course...)
Note: Don't forget to add to PATH during installation. Also, install NPM.
Test it:
npm -v
node -v
git --version
npm i nodemon -g
npm i env-cmd -g
Note: Use SUDO in linux.
git clone https://github.com/miiranta/cecomp-site
Note: Run all commands from the created folder 'cecomp-site' where package.json is located, not 'src'.
npm i
In order to run in localhost:
- Create a folder called 'ssl'.
- Add 'cert.pem' and 'privkey.pem'.
Note: The certificates don't need to be valid, just readable.
In order to run in production:
- The folder with 'cert.pem' and 'privkey.pem' need to be set as an environment variable SSLDIR.
For localhost:
- Create a folder called 'config'.
- Create a file called 'dev.env' inside 'config'.
- Add the following variables:
- PORT_HTTPS=443
- PORT_HTTP=80
Note: Default values included.
For production:
- Create a folder called 'config'.
- Create a file called 'prod.env' inside 'config'.
- Add the following variables:
- PORT_HTTPS=443
- PORT_HTTP=80
- SSLDIR=/etc/letsencrypt/live/your_certbot_url
Note: Default values included.
For production (alternative):
- Set your variables in the environment :).
For localhost:
npm run dev
For production:
npm run prod
For production (alternative):
npm start
Note: Use SUDO in linux.