A serverless microservice to demonstrate json-patch, image resizing and jwt authentication and authorization usage in nodejs.
- Login to obtain a JWT token
- JSON patch to apply patches to a JSON object
- Image Upload (Google Cloud Storage)
- Image resize to resize an image to a thumbnail size of 50x50
- Containerization
- Express.js as the web framework.
- ES2017+ with TypeScript TypeScript.
- Linting with TSlint.
- Testing with Mocha.
- Testing with Chai.
- Testing with Chai-Http.
# Install TypeScript Globally
npm install -g typescript
# Clone the project
git clone https://github.com/olamilekan000/Patcher.git
cd Patcher && cd functions
# Install dependencies
npm install
# Build app
tsc
Then you can start the application:
npm start
This will launch the server node process on port 9093
Testing is powered by Mocha.
Start the test runner with the command below:
npm test
You can also generate coverage with:
npm run coverage
API documentation is also important so I am using APIDOC.js to document the api endpoints
Install apidoc:
npm install apidoc -g
Generate API docs using:
npm run docs
Linting is set up using TSLint. It uses the rules as specificed in the tslint.json file which can be found in the functions directory.
Begin linting with the following command:
npm run lint
MIT License. See the LICENSE file.