Future Computing

This is going to be a website logging my research on DNA computing and other types of computing like Quantum

Requirements

  • PostgreSQL
  • NodeJS > v6

API

  1. Default
  2. Users
  1. Users/:id
  1. Roles
  1. Roles/:id

Routes:

Default

GET

  • Returns status (200) and JSON of API saying welcome

/users/

back to top

GET

  • Returns status (200) and JSON of all users and thier role(s)
  • Returns status (412) and a JSON message if not successful.

POST

  • Creates a new user and generates a hashed & salted password
  • Assigns a default role
  • Returns status (200) & JSON of the new user
  • Returns status (412) and a JSON message if not successful.
Params:
Name Type Default Required
firstname string null yes
lastname string null yes
email string null yes
password string null yes

/users/:id

back to top

Params:

Same for all routes

Name Type Default Required
id int null yes

GET

  • Returns status (200) and JSON of all a user and thier role(s)
  • Returns status (412) and a JSON message if not successful.

DELETE

  • Removes User From Database
  • Returns a status code of (204) if successful or (412) if not successfull.

PUT

Needs Implementation

/roles/

back to top

GET

  • Returns status (200) and JSON of all roles
  • Returns status (412) and a JSON message if not successful.

POST

  • Creates a new role
  • Returns status (200) and JSON of the new role
  • Returns status (412) and a JSON message if not successful.
Params:
Name Type Default Required
role string null yes

/roles/:id

back to top

Params:

Same for all routes

Name Type Default Required
id int null yes

GET

  • Returns JSON of the found role if successful
  • Returns status (412) if not successful.

PUT

Needs Implementation

DELETE

  • Removes Role From Database
  • Returns a status code of (204) if successful or (412) if not successful.