olamilekan000 / Patcher

An app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Simple Nodejs API

A serverless microservice to demonstrate json-patch, image resizing and jwt authentication and authorization usage in nodejs.

Features

  • 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

Technologies

Getting started

# 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

Testing is powered by Mocha.

Start the test runner with the command below:

npm test

You can also generate coverage with:

npm run coverage

Documentation

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

License

MIT License. See the LICENSE file.

About

An app


Languages

Language:TypeScript 99.3%Language:Dockerfile 0.7%