Code Monkey home page Code Monkey logo

pnk-stack's Introduction

PNK Stack Service

⚠️ Still working out issues with my testing, but this is otherwise in a pretty good state ⚠️

Backend service template using PostgreSQL, Node, and Koa

See my outreach page's Node Template post

TL;DR

This is a template for a relatively production ready backend Node micro-service. It already has error handling, logging, observability, rate limiting, graceful shutdown, a test file, and Docker optimizations.

Development Quickstart

Prerequisites

  1. Development environment setup through my guide
  2. Node.js v20.10.0 (recommended to use nvm)
  3. Docker

Setup

  1. Ensure the Node.js version listed in the .nvmrc file is active:
nvm install && nvm use
  1. Install dependencies:
make install-dev
  1. Run locally at localhost:3000:
make dev

Test

  1. Compose the Docker image:
docker compose up -d
  1. Run the database migration:
docker compose exec app npx prisma migrate deploy
  1. Test the code:
make test

pnk-stack's People

Contributors

irmerk avatar

Watchers

 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.