Giter Site home page Giter Site logo

financas-pessoais-backend's Introduction

Boilerplate API Node.Js com Express

Boilerplate for Node Js Api with Express

Clone

    https://github.com/CaioQueirozIFCE/boilerplate-api-node-js.git .

Install

   With the cloned project, run yarn install to install all dependencies listed in package.json.

Features

  • Docker support
  • Logging: using winston and morgan
  • Error handling: centralized error handling mechanism
  • Dependency management: with Yarn
  • Environment variables: using dotenv and cross-env
  • CORS: Cross-Origin Resource-Sharing enabled using cors
  • Linting: with ESLint and Prettier
  • Editor config: consistent editor configuration using EditorConfig

Running dev 🚀

   yarn dev:server

Running build 🛰️

   yarn build

Docker 🐳

# run docker container in development mode
yarn docker:dev
# run docker container in production mode
yarn docker:prod

Project Structure

src\
 |--app\                # Layer related to project infrastructure
    |--container\       # File to generate injectables (dependency injections): tsyringe
    |--errors\          # Class for managing global errors
    |--http             # Infrastructure layer related to http protocol
        |--middlewares  # Custom express middlewares
        |--server.ts    # Express app
    |--routes\          # Routes
    |--utils\           # Utility classes and functions
        |--validates.ts # Utility functions that help in project structure
        |--debugfiles\  # debug utility
 |--config\             # Environment variables and configuration related things
 |--logs\               # Application log files

Environment Variables

The environment variables can be found and modified in the .env file. They come with these default values:

#Name App
APP_NAME=boilerplate-node
# Port number
APP_PORT=3333
#Jwt key's
JWT_SECRET=
EXPIRESINJWT=
#Bcrypt key's
HASH_PASSWORD=
HASH_REQUEST=
# SMTP configuration options for the email service
MAIL_MAILER=
MAIL_HOST=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=

License

The MIT License (MIT)

Copyright © 2021 Caio Queiroz

financas-pessoais-backend's People

Contributors

ccqueiroz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.