GithubHelp home page GithubHelp logo

jictyvoo / enterprise_backend_fastify-prisma Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 93 KB

Tryout accessing BrasilAPI and save enterprises based on CNPJ

Shell 2.05% Dockerfile 3.06% TypeScript 94.89%

enterprise_backend_fastify-prisma's Introduction

Be a Player 2 Backend Challenge

The Challenge

Instructions

Requirements

In order to run this application, it's needed to have:

  • NodeJS-14
  • SQL database -is highly recommended to be a MySQL database.

Running

With the needed requirements set up, is needed to install all package dependencies, it can be installed using the command

npm install

After that, is needed to setup the .env file, containing the info to access your database and a secret key, for encrypting the token for authentication.

As this project uses Prisma engine, it's needed to run the command

npx prisma migrate

that will migrate all tables in your database.

In order to run this project, you can:

  • build it: npm run build

    • run: node dist/server.js
  • run on dev mode: npm run dev

Docker

In case is needed to run it on a docker production environment, is only needed to run the command:

docker-compose up -d

This command will build all docker images that the application neededs.

Database

As the Dockerfile for building this server is optimized for production, it's not possible to run prisma commands directly, as they are commands for development. So in order to have this fully operational, it's needed to connect with the database and run the migrations.

enterprise_backend_fastify-prisma's People

Contributors

jictyvoo avatar

Watchers

James Cloos avatar  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.