What things you need to install the software and how to install them
- nodejs - v10.14.1
- mongoDB - v4.0.1
- @babel/cli - ^7.1.5
- @babel/core - ^7.1.6
- @babel/node - ^7.0.0
In order to deploy this project you should follow these steps:
- Clone this repository:
git clone https://github.com/AlbGarciam/PiedPipers_NodeJS.git
- Configure
.env
file. You have an example on.env.variables
# Express configuration
PORT = 8080
# Mongo configuration
MONGO_PATH = "127.0.0.1"
MONGO_PORT = 2703
MONGO_DATABASE = "PiedPipers"
# JWT config
JWT_ALGORITHM = "RS256"
#In minutes
USER_ACTION_TTL = 30
#Firebase path
FIREBASE_PATH = "https://<YOUR-FIREBASE>.firebaseio.com"
# Geo provider key https://opencagedata.com
GEO_PROVIDER_KEY = "YOUR GEO PROVIDER KEY"
- Update
etc/keys/private.key
andetc/keys/public.pem
to secure JWT - Update
etc/keys/firebaseAccountKey.json
with your own key - Install dependencies
npm install
- Run script to prepare database. This script will create a directory/subdirectory at
database/db
npm run preparedb
- Run script to start database. It will use mongo configuration at
etc/mongo.conf
npm run database
- Run script to start server. This script will run a nodemon to run the server
npm run start
Documentation can be found here
To generate documentation run the following command:
npm run doc