An open API service indexing awesome lists of open source software.

https://github.com/peterdee/vue-login-form-backend

Backend for the vue-login-form-frontend project
https://github.com/peterdee/vue-login-form-backend

Last synced: over 1 year ago
JSON representation

Backend for the vue-login-form-frontend project

Awesome Lists containing this project

README

          

## Backend for the vue-login-form-frontend

[![Known Vulnerabilities](https://snyk.io/test/github/peterdee/vue-login-form-backend/badge.svg?targetFile=package.json)](https://snyk.io/test/github/peterdee/vue-login-form-backend?targetFile=package.json)

Frontend project: [`vue-login-form-frontend`](https://github.com/peterdee/vue-login-form-frontend)

Stack: [`Koa`](https://koajs.com)

**DEV**: http://localhost:8080

**STAGE**: https://vue-login-form-backend.herokuapp.com

Hardcoded user credentials:
```text
login: user@test.com
password: qwerty123
```

### Routes

- `/` - `GET` - ping the server
- `/api/dashboard` - `GET` - get user email and name for the dashboard
- `/api/login` - `POST` - login request
- `/api/posts` - `GET` - get all of the posts
- `/api/posts?id=` - `GET` - get a single post

### Deploy

- `git clone https://github.com/peterdee/vue-login-form-backend`
- `cd ./vue-login-form-backend`
- `nvm use 13.2` (please see the actual Node version in [package.json](package.json) file)
- `npm i` (use `npm i --prod` for `stage` / `production`)

### Launch

Development:

- `npm run dev`

Stage / production:

- `npm start`

### Heroku

The `stage` branch is deployed to [Heroku](https://herokuapp.com/) automatically