-
Notifications
You must be signed in to change notification settings - Fork 6
Getting Started [Vagrant]
Do Trong Long edited this page Jan 30, 2023
·
3 revisions
Warning:
- Vagrant option will no longer receive updates please use other methods
Create a Vagrantfile
with below content
Vagrant.configure("2") do |config|
config.vm.box = "dotronglong/faker"
# uncomment this to use specific version
# config.vm.box_version = "2.0.3"
# uncomment this to use private network
# config.vm.network "private_network", ip: "192.168.33.15"
# uncomment to set up mocks folder, faker won't start unless mocks folder is set up
# config.vm.synced_folder "./path/to/your/mocks/folder", "/opt/faker/mocks", type: "nfs"
end
Start vagrant machine
vagrant up
Add new file (e.g, users.json)
{
"request": {
"method": "GET",
"path": "/v1/users"
},
"response": {
"body": [
{ "id": 1, "name": "John" },
{ "id": 2, "name": "Marry" }
]
}
}
Login to vagrant machine to restart faker
sudo service faker stop
sudo service faker start