https://github.com/petermosmans/vue-3-secure-coding
https://github.com/petermosmans/vue-3-secure-coding
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/petermosmans/vue-3-secure-coding
- Owner: PeterMosmans
- License: gpl-3.0
- Created: 2023-08-28T12:00:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T16:37:20.000Z (almost 2 years ago)
- Last Synced: 2025-03-16T19:50:45.372Z (about 1 year ago)
- Language: Vue
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# notes
This is a Vue 3 demo application meant to learn secure coding. Make sure to NOT
use this anytime in production, as this site contains deliberate security
vulnerabilities.
## How to use
Clone the repository to a directory. In that directory, run
```bash
npm install
```
### API endpoint
The repository contains a (very insecure) 'mock' API endpoint. To run the API
server, ensure that the variables in `.env.development.local` are suitable for
your environment (`API_HOST` and `API_PORT` on which IP address and port the API
server will listen). Then, run
```bash
./start-api-server.sh &
```
This will start the API server in the background. When encountering login
errors, please ensure that the (development or production) web server can access
the API endpoint.
To check that, go to the path `/db` of the (development / production) web
server: This should output a JSON file containing the data store. If not, then
double-check whether the API server is running and listening on the specified
host and port.
## Start local development web server
The port number for the local development server is configured in
`.env.development.local` as `WEB_PORT`.
```bash
npm run dev
```
### Docker image
To build a Docker image which will host nginx and the application, run
```sh
npm run image
```
This executes the build script, which reads the `.env.production.local`
variables and uses them to configure the API "proxy" in nginx.
### Run Docker container
The container will listen on the ports specified in `package.json`.
```sh
npm run test
```
## About
This project is scaffolded using:
```bash
npm create vue@latest notes
cd notes
npm install
npm run dev
```