Skip to content

amilanila/TmanaWS

Repository files navigation

Express & ES6 REST API Boilerplate

bitHound Score

This is a straightforward boilerplate for building REST APIs with ES6 and Express.

Tip: If you are using Mongoose, you can automatically expose your Models as REST resources using restful-mongoose.

Getting Started

# clone it
git clone git@github.com:developit/express-es6-rest-api.git
cd express-es6-rest-api

# Make it your own
rm -rf .git && git init && npm init

# Install dependencies
npm install

# Run it
set PORT=8081 & npm start

# With nodemon:
PORT=8080 nodemon

License

MIT

URLs:

Get all players: GET -> http://localhost:8080/api/player

Get root: GET -> http://localhost:8080/api/

Create player: POST -> http://localhost:8080/api/player/create JSON -> { "name": "Amila Nilantha", "birthday": "August 24", "height": "5 8", "weight": "61kg", "description": "All rounder", "battingStyle": "Right handed", "bowlingStyle": "Right arm medium pace", "team": "Grasshoppers", "division": "Divition-3", "season": "Autumn-Winter 2017", "match": "1", "runs": 20, "runsConceded": 8, "oversBowled": 2, "wickets": 1, "catches": 1, "contribution": 12, "outs": 2 }

Get player with name: GET -> http://localhost:8080/api/player/Amila Nilantha

Delete player with name: GET -> http://localhost:8080/api/player/delete/Amila Nilantha

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published