- How to use Git
- VirtualBox & Vagrant
- Agile Planning
- Unittest
- Creating a CI/CD pipeline
- Docker
- Infrastructure as code / deploying to cloud (AWS)
It is to build the /users
resource.
Download VirtualBox
Download Vagrant
Clone the project to your development folder and create your Vagrant vm
$ git clone https://github.com/IJaykkk/resmo.git
$ cd resmo
$ vagrant up
In the vm, run
$ vagrant ssh
$ cd /vagrant
$ python run.py
In the vm, run
$ vagrant ssh
$ cd /vagrant
$ nosetests
it will show the test result and coverage rate
-
/users
Use this URL to GET the list of all user resources.
-
Example:
curl -X GET http://0.0.0.0:5000/users
-
users/{id}
Use this URL to retrieve a user with specific
{id}
. -
Example:
curl -X GET http://0.0.0.0:5000/users/1
-
/users
Use this URL to send POST request.
-
Example:
curl -d '{"email": "example@exmaple.com"}' -H "Content-Type: application/json" -X POST http://0.0.0.0:5000/users
-
/users/{id}
Use this URL to update an existing entry in our resources where the user id is
{id}
-
Example:
curl -d '{"email": "test@test.com"}' -H "Content-Type: application/json" -X PUT http://0.0.0.0:5000/users/1
-
/users/{id}
Use this URL to DELETE the user resources which satisfied the id equals to
{id}
-
Example
curl -X DELETE http://0.0.0.0:5000/users/1
-
/users?query1=value&query2=value
Use this URL to GET the user resources which satisfied all the query conditions.
-
Example:
curl -X GET "http://0.0.0.0:5000/users?email=foo@bar.com"
When you are done, you can use the exit
command to get out of the virtual machine just as if it were a remote server and shut down the vm with the following:
$ exit
$ vagrant halt
If the VM is no longer needed you can remove it with from your computer to free up disk space with:
$ vagrant destroy