1.0.14 • Published 6 years ago

prs-webapi-server v1.0.14

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

PRS WebAPI Server (Node)

This is a JSON WebAPI server written in Node. It is used for providing a service for students of Angular to access.

Instruction

It is convenient to setup a script to start the server rather than typing a long command. Open the package.json file and add a line to the scripts key:

"start": "node node_modules/prs-webapi-server/server.js"

Make sure to include an ending command if this is not the last script.

Now start the server with:

npm start

This starts the server on port 5000. In the browser URL, type:

http://localhost:5000

APIs Available

  • /Users/List - return an array of User objects
  • /Users/Get/5 - return a User object (5 is the id)
  • /Users/Create - add a User (User object in body)
  • /Users/Change - change a User (User object in body)
  • /users/Remove - remove a User (User object in body)
  • /users/Auth/username/password - authenticate a User

Data returned

All the APIs return a JSON object:

{
  rs: [returncode],
  msg: [returnmessage],
  data: [returneddata]
}

data is returned on List and Get. It is null on Create, Change, and Remove

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.0

6 years ago