The goal of the project is to buld REST APIs with Deno and Oak library.
For the tutorials check the below links,
First of all make sure you have Deno installed.
Then start MySQL docker and run the db_initializer.sh
script to create the users
table,
$ cd docker && docker-compose up -d && ./db_initializer.sh
And finally run the following command,
$ deno run --allow-env --allow-read --allow-net index.js
Now, open the browser and hit localhost:8080
.
GET /
- displays welcome pageGET /v1/users
- returns a list of usersGET /v1/users/:id
- gets a user by idPOST /v1/users
- creates a new userPUT /v1/users/:id
- update an existing userDELETE /v1/users/:id
- deletes a user by id