Hackerbay_io
Node.js Backend
Endpoints
The API features the following endpoint functionalities
Public Endpoints
- /login
- The api accepts any username/password.
- Returns a signed Json Web Token which can be used to validate future requests.
Protected Endpoints
The following two endpoints should be protected. The JWT obtained in the /login endpoint must be attached to each request. If the JWT is missing or invalid, these endpoints should reject the request.
- /home/apply_json_patch
- Request body should contain a JSON object and a JSON patch object.
- Apply the json patch to the json object, and return the resulting json object.
- /home/create_thumbnail
- Request should contain a public image URL.
- Download the image, resize to 50x50 pixels, and return the resulting thumbnail.
Fulfilled Requirements
- Code Requirements
- Included Mocha as a test suite for the microservice.
- Used modern javascript ES6 syntax.
- Other Requirements
- Used git for version control, and hosted the project in a Github repository.
- Project contains documentation with setup and usage instructions.
- Project installs all dependencies with
npm install
, starts the server withnpm start
, and runs the test suite withnpm test
.
- Bonus Points
INSTRUCTIONS
- Clone the repository
$> git clone https://github.com/tarang727/Hackerbay_io.git
- Install all the dependencies.
$> npm install
- See all the test cases pass.
$> npm test
- Start the API server.
$> npm start
ReactJS Frontend
- git clone the repository https://github.com/tarang727/Hackerbay_io.git
- go to reactJS_frontend folder
$ cd reactJS_frontend
- install dependencies
$ npm install
- Start the game in production mode with:
npm serve
- Start the game in development mode with:
npm start