Simple Rest API for Service-Oriented Architectures exam
Written with Koa js
Examples of http requests can be found in requests.rest file or inside ./test directory
Setup environement variables inside .env file.
Warning It is mandatory to generate a secret to start the server
Set a value to ACCESS_TOKEN_SECRET so that the server can sign jwt token for authentication
# .env
ACCESS_TOKEN_SECRET=$insert-secret
Example of secret generation with nodejs
:
node
require('crypto').randomBytes(64).toString('hex')
npm install
npm run start:http
Warning: Requires cert
npm run start:https
npm run test