Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 844 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 844 Bytes

koa-passport-mongoose

A simple Node.js Koa server with password and oAuth login using passport and persisted to MongoDB This is probably better for serving native apps, because it uses JWT. For browser apps, storage of JWT is tricky and not safe, so a more complex solution is needed.

Can be hosted on Heroku with ease.

Facebook and Google auth will not work on Heroku unless you upgrade to hobby tier or above and enable SSL.

To run

change the example.env.local to .env.local

npm install
npm run build

# Make sure you have docker running on your system

# Only needs to be done once:
make setup
# Needs to run each time you add a new dependency:
make install
# Later you can just call this to start:
make dev

server will be available on localhost:<The port number you used in .env file> eg. localhost:3003