Code Monkey home page Code Monkey logo

typescript-typeorm-koa-template's Introduction

TypeScript, TypeORM, Koa Template

Setup

Ensure you have nodejs and yarn installed, then:

yarn

Set up a local postgres database, then run (in this repository's root):

cp .env.example .env

Fill the .env file with the url to the local database and the localhost port the server should run on.

Usage

Build

To transpile to javascript:

yarn build

Watch & Run

To watch for changes and automatically transpile:

yarn watch

Then, to run it locally (and update on code changes - make sure yarn watch is running in a terminal):

yarn dev

Run

To run locally without watching for code changes:

yarn start

Automatic pre-commit checks

Before a commit is made, all .ts and .js files will automatically be linted by eslint and formatted by prettier.

To run those checks manually:

yarn lint
yarn format

Automatic pre-push checks

Before a push is made, the code will be type checked to ensure there are no typescript issues.

To run this check manually:

yarn type-check

Types for .env

To generate typescript types for the .env file, run:

yarn gen-env

Make sure a .env file with information inside exists, otherwise the .env.template and types might be made blank.

Adding an Entity, Migration, Controller etc.

For entities and migrations, refer to the typeorm documentation.

For controllers, refer to routing-controllers.

typescript-typeorm-koa-template's People

Contributors

srugina avatar

Watchers

 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.