Skip to content

TarasMakarchuk/nest-knex

 
 

Repository files navigation

Nestjs Knex Objection js rest API

nest-knex uses Typescript, Node.js and mysql with famous library objectionjs and knex.

Quick Start

The quickest way to get started with nest-mysql server use github repository and clone as shown below:

# clone repository
$ git clone https://github.com/AlxPatidar/nest-knex.git server
# change directory to server folder
$ cd server

Installation

Install dependencies and devDependencies:

$ yarn install / npm install

Configuration

Configuration environment and change basic credentials:

$ cp .env.example .env

Create Database

$ mysql -u root -p
-> password:- ****
$ create database knex_mysql

Start Server

Start the nest server:

$ yarn start / npm start

Start the nest development server:

$ yarn start:dev / npm start:dev

Useful npm/yarn commands

  • yarn build - Transpile TypeScript code
  • yarn start - Run application
  • yarn start:dev - Run application in development mode
  • yarn run format - Formate code with pritter
  • yarn run lint - Run for typescript linting
  • yarn run test - Run for test
  • yarn run migrate:make - Run for create migration with name of migration
  • yarn run migrate:latest - Run for migrate and create schema
  • yarn run migrate:rollback - Run for rollback batch migration
  • yarn run seed:make - Run for create seed file to seeding database
  • yarn run seed:run - Run for seeding database

Docs & Community

Stay in touch

License

Nest is MIT licensed.

About

🐙 Nest knex with objection js. Objectionjs library is make your relationship(database) and code cleaner and shorter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%