Skip to content

oliveirabalsa/maximo-hackaton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maximo-hacking-rio

Somos o máximo

Crud system with Deno application

Modules use:

abc@v1.0.0-rc2 - For router(Similar Express)

dotenvc@v1.0.0-rc2 - Variables globals in root file

mongo@v0.6.0 - MongoDB connection

typescript@3.9 - Language typed

Endpoint Router

  get /users
  post /users
  get /users/:id
  put /users/:id
  delete /users/:id
  get /tasks
  post /tasks

Post

{
    "name": "Luan",
    "lasName": "Silva",
    "email": 'luan@luan.com',
    "password": '12345678"
}

Has validation for Header type, if content-type is application/json
Has validation if body data this empty

Update

{
    "name": "Leonardo",
    "lasName": "Oliveira",
    "email": 'leo@leo.com',
    "password": '12345678"
}

Has validation for Header type, if content-type is application/json
Has validation if body data this empty

.ENV

DATABASE_NAME=<DATABASE_NAME>
DATABASE_HOST=<URI_MONGO>

Start server


deno run -A --unstable ./server.ts
-A => permission for --allow-all

Tags

--allow-write write permission
--allow-read read permission
--allow-plugin access to the plugin created by the mongo
--allow-net network access permission
--allow-env permission to access .env in the root folder
--unstable for running unstable packages
--allow-all for running with full permission

Semantic Commits

feat: (new feature for the user, not a new feature for build script)
fix: (bug fix for the user, not a fix to a build script)
docs: (changes to the documentation)
style: (formatting, missing semi colons, etc; no production code change)
refactor: (refactoring production code, eg. renaming a variable)
test: (adding missing tests, refactoring tests; no production code change)
chore: (updating grunt tasks etc; no production code change)

About

code before the hackaton day

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages