/playground-koa-auth

A playground for Koa with authentication and authorization.

Primary LanguageJavaScriptMIT LicenseMIT

playground-koa-auth

Generated by Node Project Generator.

License

A playground for Koa with Authentication and Authorization.

Development

  • Clone the repo
$ git clone https://github.com/robertoachar/playground-koa-auth.git
  • Install dependencies
$ npm install
  • Run scripts
Action Usage
Start development mode npm start
Lint code npm run lint

Environment

# .env file
NODE_ENV = development
DATABASE = mongodb://localhost:27017/playground-koa-auth
PORT = 3000
JWT_SECRET = secret

Endpoints

Method Endpoint Description
POST /auth/signup Create an account
POST /auth/login Log In
GET /auth/profile User profile (must be authenticated)

Author

Roberto Achar

License

MIT