/simple-node-api

Simple Node API Example

Primary LanguageJavaScript

simple-node-api

Simple Node API sample

Quick Start

To start the application is very simple.

Install dependencies by Node:

$ npm install

or Install dependencies by Yarn:

$ yarn

Start the server:

$ node index.js

Features

  • List Artists
  • List Artist
  • Create Artist
  • Update Artist
  • Remove Artist

Endpoints

List All

GET /artists/index

http://localhost:3000/artists/

List By index

GET /artists/:index

http://localhost:3000/artists/1

Remove

DELETE /artists/:index

http://localhost:3000/artists/2

Create

POST /artists

http://localhost:3000/artists/

Request Body

{
	"name": "James Blunt"
}

Update

PUT /artists/:index

http://localhost:3000/artists/2

Request Body

{
	"name": "Adele Laurie Blue Adkins MBE"
}

License

MIT