Giter Site home page Giter Site logo

driven.t's Introduction

Driven.t - Back-end

Back-end for Driven.t, an event management solution.

About

Driven.t is a web browser application with which you can manage every single aspect of your event.

How to run for development

  1. Clone this repository
  2. Install all dependencies
npm i
  1. Create a PostgreSQL database with whatever name you want
  2. Configure the .env.development file using the .env.example file (see "Running application locally or inside docker section" for details)
  3. Run all migrations
npm run dev:migration:run
  1. Seed db
npm run dev:seed
  1. Run the back-end in a development environment:
npm run dev

How to run tests

  1. Follow the steps in the last section
  2. Configure the .env.test file using the .env.example file (see "Running application locally or inside docker" section for details)
  3. Run all migrations:
npm run test:migration:run
  1. Run test:
npm run test

Building and starting for production

npm run build
npm start

Running migrations or generate prisma clients

Before running migrations make sure you have a postgres db running based on .env.development or .env.test file for each environment.

You can operate on databases for different environments, but it is necessary to populate correct env variables for each environment first, so in order to perform db operations type the following commands:

  • npm run dev:migration:run - run migrations for development environment by loading envs from .env.development file. It uses dotenv-cli to load envs from .env.development file.

  • npm run test:migration:run - the same, but for test environment.

  • npm run dev:migration:generate -- --name ATOMIC_OPERATION_NAME - generate and run migration and prisma client for development environment by loading envs from .env.development file. Replace ATOMIC_OPERATION_NAME by the name of the migration you want to generate.

What to do when add new ENV VARIABLES

There are several things you need to do when you add new ENV VARIABLES:

  • Add them to .env.example file
  • Add them to your local .env.development and .env.test files

driven.t's People

Contributors

darlanschwartz avatar leticia-chijo 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.