Code Monkey home page Code Monkey logo

nextback's Introduction

Description

Nest framework TypeScript starter repository.

Production

If you want to run as a production, you need nothing but docker (yes you even do not need install yarn, nodejs and so on, we will install it auto when we are building the docker-compose).

$ docker-compose -f docker-compose.yml build
$ docker-compose -f docker-compose.yml up

But... if you have yarn, you can enter those commands instead of commands above (short and easy to input):

$ yarn docker-compose build
$ yarn docker-Compose start

Installation

$ yarn

Devlopment

Before run command below, you need to install the project's dependencies (see sub-section 'Installation')

We can use those to run the nextback without database:

# development mode with watch mode
$ yarn start --mode=dev

# production mode
$ yarn start --mode=prod

And if we are in devlopment, the backend will try to connect the database at localhost but not the host in ./ormconfig.json.

Yes, but we need database. You can read the sub-section 'Run a empty database' for more infomation.

Run the empty database

Those command will help you if you want to create a empty database at localhost.

# This command will create a database docker image.
$ yarn database build

# This command will run a database container at port 3306
$ yarn database start

# This command create a cli for you.
$ yarn database cli

# This command will remove the database container
$ yarn database stop

Debug

  1. First of all, try to enter yarn database stop and retry.
  2. Maybe you find that the we cannot get the port 3306. Try to use lsof -i:3306 (or sudo lsof -i:3306). And kill it (if it is not your machine, ask manager).

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

nextback's People

Contributors

peterlitszo avatar

Watchers

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