This is the demo repository for basic REST API example using Deno
We just need to install deno. Follow the link for installation.
Once the installation is done execute following command to start Deno Rest API server
deno run --allow-net server.ts
Make sure to pass --allow-net argument as we are using network for the rest API requests.
The command will start server on port 8000.
Hit one of the API end points to get API response
- GET - http://localhost:8000/api/v1/products (Get all Products)
- GET - http://localhost:8000/api/v1/products/:id (Get Product by id)
- POST - http://localhost:8000/api/v1/products (Add new Product)
- PUT - http://localhost:8000/api/v1/products/:id (Update Product by id)
- DELETE - http://localhost:8000/api/v1/products/:id (Delete Product by id)