Code Monkey home page Code Monkey logo

crap-stories-node's Introduction

Crap Stories Node.js

Environment Variables

Variable Name Required Value
NODE_ENV development
DOMAIN localhost
PORT 3001
LOG_LEVEL debug
DB_HOST postgres://localhost:5433/
COMMIT_HASH aou32b9e2d
CORS_URLS "https://www.my-website.de"
PGSSLMODE "disable" or "no-verfiy" for heroku

Create a .env.local file for local overrides.

Docker

Running PostgreSQL for local development

The docker-compose file starts a local PostgreSQL server to run against - don't forget to set the DB_HOST environment variable!

Available Scripts

start

Start the server in production mode

start:inspect

Start the server with node debugging enabled: https://chrome.google.com/webstore/detail/nodejs-v8-inspector-manag/gnhhdgbaldcilmgcpfddgdbkhjohddkj?hl=en

start:watch

Start the server with debugging and refresh if file changes happen

test

Run tests while watching changes

test:ci

Run tests and quit after execution

build

Create a build in the dist folder with typescript definition files

Database knex interaction

Migrations

To create a migration:

node -r @swc-node/register node_modules/.bin/knex migrate:make table_name

To run all migrations:

npx knex migrate:latest

Seeds

To run all seeds:

npx knex seed:run

crap-stories-node's People

Contributors

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