Giter Club home page Giter Club logo

koa-mongoose-jwt-auth-boilerplate's Introduction

Koa, Mongoose, JWT Auth Example fork from Koa Boilerplate

KoaJs Slack

This is one of many build of Koa + Mongoose + Passport.js + ES7. Thx a lot to [@Jeffijoe] and his Koa Boilerplate

Quick start

# Clone repository.
git clone [email protected]:ZabedovskiyA/koa-mongoose-jwt-auth-boilerplate.git new-project

# Go to project folder.
cd new-project

# Install dependencies
yarn
# Run in development mode 

yarn dev

Server will starts at http://localhost:5000/

Settings

  1. In `src/config` create file config.js
  2. Add your database name in dbName
  3. Database user in dbUser
  4. Database password in dbPass
  5. Database host in dbHost
  6. Database port in dbPort

npm run scripts

There are a few defined run scripts, here's a list of them with a description of what they do. To run them, simply execute npm run <script name> - e.g. npm run dev

  • start: Used by the production environment to start the app. This will run a compiled version, so you need to execute build first.
  • build: Runs the babel CLI to compile the app. Files are emitted to dist/.
  • dev: Runs the app in development mode - uses babel-node to compile on-the-fly. Also uses nodemon to automatically restart when stuff changes.
  • test: Runs tests.
  • cover: Runs tests and collects coverage.
  • lint: Lints + formats the code.

Tip: to pass additional arguments to the actual CLI's being called, do it like in this example:

For npm:

# Note the `--` before the actual arguments.
npm run test -- --debug

For yarn:

# Yarn does not need the `--` before the actual arguments.
yarn test --debug

docker-compose up scripts

For running dev:

# Note: use --build only when you want to build. Usually when you change packages.json
docker-compose up --build

Tasks

Add socket.io support

Add migrations

Add logging

License

MIT.

koa-mongoose-jwt-auth-boilerplate's People

Contributors

jeffijoe avatar alex-hello avatar shirokovroma avatar iraycd avatar brendanvinson avatar crobinson42 avatar jakobrosenberg avatar

Watchers

James Cloos 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.