This project implements the SiSMoChat API and server's features.
API documentation will be released according OpenAPI spec.
After cloning this repo, you must create a .env file like this
PORT=1234
NODE_ENV=development
JWT_SECRET=trytoguess
where
PORTis not mandatory (the default value of3000will be used in its absence),NODE_ENVmust be set todevelopmentto create local copy of database, sqlite for dev environmentJWT_SECRETis you secret for JWT, in production there is another value!
Then, you must run
npm init
npx sequelize db:migrate
Now, npm start execute the server, enjoy!
There are a suite of tests, based on Jest / supertest; to launch the test type
npm test
A test DB instance will be created and tests will run on it.