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
- Host: GitHub
- URL: https://github.com/peterdee/vue-login-form-backend
- Owner: peterdee
- Created: 2019-11-24T10:48:21.000Z (over 6 years ago)
- Default Branch: stage
- Last Pushed: 2020-05-12T06:57:34.000Z (about 6 years ago)
- Last Synced: 2025-01-21T10:11:14.648Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://vue-login-form-backend.herokuapp.com/
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Backend for the vue-login-form-frontend
[](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