** This was a throwaway project I started for a course I wanted to create, I might create a medium article instead, feel free to use, copy, whatever =).
-
covering typescript, since deno is pure typescript
-
deno under the hood - using tokio library (instead of libuv), compiles typescript directly which means slower compile time, but faster runtime...
-
the deno ecosystem, no npm, we use deno/x
-
the deno cli
-
how to write tests in deno
a library used to spy on functions and create stubs for tests
a library used to read .env file and manage environment variables
similar to node's joi, used to validate input
mongodb implementation based on rust
how to authenticate, manage distributed sessions with cookies, and proper authentication
express like library, context based (influenced from GO)
script runner for deno, like nodemon
to install globally, you need to add "$HOME/.deno/bin" to path variable so denon packages can be used globally
-
denon
(requires denon to be installed) -
deno run --allow-all --unstable src/index.ts
runnin quickly (unsafe), the unstable flag is for the deno plugins feature (used by mongodb)
deno test --allow-all --unstable
POST /auth/login
-> login as user, requires password and email fields, registers a cookie and creates a session idPOST /auth/register
-> create a new user, requires password and email fields, registers a cookie and creates a session id
GET /auth/logout
-> logs a user out by invalidating the session ID, and clearing the cookiesPOST /todo
-> create a new todo (accepts text)GET /todo
-> returns all the todos for the logged in userGET /todo/:id
-> returns a single todo by idPUT /todo/:id
-> updates a todo (only text or done)DELETE /todo/:id
-> delete a todo by id