GithubHelp home page GithubHelp logo

hanchiang / typescript-node-docker Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.15 MB

A simple dockerised typescript koa server, ready to be developed and deployed

Dockerfile 14.57% TypeScript 59.78% JavaScript 25.65%
nodejs typescript docker docker-compose koajs docker-multi-stage-build mocha sinon

typescript-node-docker's Introduction

Introduction

This is a typescript koa project with the following features:

  • docker with multi stage build for development and production
  • docker compose for development
  • error handlers
  • tests with mocha and sinon
  • prettier
  • eslint

Setup

Install required tools

Clone project

Set up environment variables

.env.dev:

  • COOKIE_SECRET=mycookiesecret
  • NODE_ENV=development

Using the project

Run in development mode

  • Build: docker-compose build
  • Start: docker-compose up -d
  • Server is available at: localhost:3000
  • Stop: docker-compose down

Build production image

  • npm run docker-build-prod

Note

Whenever new packages are added via npm install:

  • You need to stop the service: docker-compose stop <service> or docker-compose down
  • Build the service: docker-compose build <service>
  • Start the service: docker-compose start <service> or docker-compose up -d

Reference

typescript-node-docker's People

Contributors

hanchiang avatar

Watchers

 avatar  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.