Git Product home page Git Product logo

typescript-node-koa-realworld-example-app's Introduction

RealWorld Example App

Example Node.Js (Koa.js + Knex) codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

This repo is functionality complete โ€” PRs and issues welcome!

This codebase was created to demonstrate a fully fledged fullstack application built with Koa.js + Knex including CRUD operations, authentication, routing, pagination, and more.

We've gone to great lengths to adhere to the Koa.js + Knex community styleguides & best practices.

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

Getting started

Installation

  1. Instal Node.JS latest version
  2. Clone this repo
  3. Install dependencies, just run in project folder: npm i or yarn

Usage

  1. run npm run transpile:w to watching and transpiring ts to js files
  2. run npm start to start server

Testing

  1. run npm test for tests

Server Configuration (optional)

You can use .env file, to configure project like this:

NODE_ENV = development
PORT = 3000
SECRET = secret
JWT_SECRET = secret
DB_CLIENT = sqlite3
#DB_CONNECTION = postgres://user:password@localhost:5432/db_name

you can just copy .example-env

Variables description

NODE_ENV - specify env: development/production/test. development by default

NODE_PORT - specify port: 3000 by default

NODE_SECRET - custom secret for generating passwords. secret by default

JWT_SECRET - custom secret for generating jwt tokens. secret secret by default

DB_CLIENT - database to use. pg - postgress or sqlite3. sqlite3 by default

DB_CONNECTION - db connection string for postgress database.

Fixtures (optional)

  1. load fixtures: npm run db:load (it uses settings from .env). Don't forget to set NODE_ENV.

Styleguide

Standard - JavaScript Style Guide

How it works

Describe the general architecture of your app here

typescript-node-koa-realworld-example-app's People

Contributors

alonski avatar dimonnwc3 avatar ericsimons avatar limarenkodenis avatar

Stargazers

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