Hi folks! This is my first project working with Deno. It's only a 'getting started' kind of project with a simple Rest API and MongoDB/PostgreSQL connection.
Installation
First we need to instal Deno following this link.
In order to use MongoDB or PostreSQL we include them with Docker implementation (Install Docker and Docker compose). Otherwise you can use your own database engine, and obviously you have to change your connection string.
Features
With this simple project you will be able to test /users endpoints (GET, POST, PUT and DELETE). And you can decide which db use only adding the query string db=mongo or db=postgres.
Running the project
If you will use docker-compose you have to run on the root of the project:
docker-compose -f docker/docker-compose.yaml up
Await a few seconds until databases are ready and then run in another terminal window:
deno run -A --allow-net --allow-write --allow-read --allow-plugin --unstable index.ts
After this the server has to start and you will be able to make requests.
Repository
You can find the repository code here
Top comments (0)