A simple Node.js server that provides an API for WTF (World Texting Foundation)
- Install dependencies
$ npm i
- Run DB migrations
$ npm run dbm:run
- Run DB seeds
$ npm run dbs:run
- Create .env file in root with this content
JWT_SECRET=
PORT=3000
- Run script to generate JWT secret
$ npm run spt:secret
- Fill
JWT_SECRET
value
JWT_SECRET=<value>
PORT=3000
- To start the API server run
$ npm start
- To run the test suite
$ npm test
- There's a Postman collection ready to be imported inside
/src/docs
- If you want to use the guarded endpoints
PUT
andDELETE
/acronym/:acronym, generate a token running
$ npm run spt:token
- Document API using Swagger to have a more universal way to test the endpoints
- Use Docker to containerize API, and maybe even use a more robust database like PostgreSQL in conjunction