Coder Social home page Coder Social logo

1money-backend's Introduction

๐Ÿงฌ Cloning this project

  1. To run this project you must have Git installed on your machine. On your terminal run:
git clone https://github.com/amazonsoft-tech/1money-api.git
  1. Access the root folder:
cd 1money-api

๐Ÿ’ฟ Installing dependencies

  1. You must have Yarn or NPM installed so you can install the dependencies this project demands. In the root directory, run:
yarn install

in case you have NPM instead of Yarn run:

npm install

๐Ÿš€ Running this API on localhost

  1. You must have Node installed on your machine to run this project on localhost. Run:
yarn dev

or

npm run dev

๐Ÿ”— Database connection (TypeORM)

  1. Rename file .env.example to .env

  2. In the file .env, set the environment variables you'll need to use:

TYPEORM_HOST=               set the host here
TYPEORM_USERNAME=           set the database username
TYPEORM_PASSWORD=           set the database password
TYPEORM_DATABASE=           set the database name
TYPEORM_PORT=               set the database port
TYPEORM_MIGRATIONS=         set the directory where the migrations (if any) are located and the language they're written in (.ts or .js)
TYPEORM_MIGRATIONS_DIR=     set the directory where the migrations (if any) are located
TYPEORM_ENTITIES=           set the directory where the entities are located and the language they're written in (.ts or .js)
TYPEORM_ENTITIES_DIR=       set the directory where the entities are located
SECRET=                     set the user secret key you'll use for JWT
SECRET_ADMIN=               set the admin secret key you'll use for JWT

๐Ÿ“… Running migrations

  1. To run the migrations and create the database tables run:
yarn typeorm migration:run

or

npm run typeorm migration:run
  1. To revert the last migration you ran run:
yarn typeorm migration:revert

or

npm run typeorm migration:revert

1money-backend's People

Contributors

gustav-dev17 avatar douglas-filipe avatar

Stargazers

 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.