A minimal REST server built w/ Deno
Clone the repository using Git:
git clone https://github.com/dj0nny/deno-mongodb-rest-api.git
Or download here.
There is no installation this time. 😱
All package are decentralized and they are imported via URL.
You must have Deno installed on your local machine. For more info: https://deno.land/.
Before starting rename the .env.example
file in .env
and fills it.
Compared to Node.js, Deno provides by default a more secure protection when you run the script. For running correctly this program, you must explicitly grant the permissions:
deno run --allow-net --allow-write --allow-read --allow-plugin --unstable --allow-env src\index.ts
- project setup
- add
README.md
,.gitignore
and.env
- install Oak
- setup router and middlewares
- add Hello World route (
/
) - install mongo
- setup mongo
- add Users route (
/users
)- GET users
- POST user
- GET one user
- PUT user
- DELETE user
👤 Francesco Giambruno
- Deno - A secure runtime for JavaScript and TypeScript
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!