fedimovies-web/README.md

60 lines
756 B
Markdown
Raw Permalink Normal View History

2021-04-17 03:16:54 +00:00
# Mitra Web
Default frontend for [Mitra](https://codeberg.org/silverpill/mitra).
2022-09-20 21:32:30 +00:00
<img width="650" src="screenshot.png" alt="screenshot">
2021-12-10 14:25:59 +00:00
2021-04-17 03:16:54 +00:00
## Requirements
2021-12-10 14:25:59 +00:00
- node 12 or 14
2021-04-17 03:16:54 +00:00
- npm 7+
## Project setup
```
2022-04-30 12:49:45 +00:00
npm install --no-save
2021-04-17 03:16:54 +00:00
npx allow-scripts
```
2022-04-30 11:50:43 +00:00
### Compile and minify for production
Set backend URL:
2021-04-17 03:16:54 +00:00
```
2022-04-30 11:50:43 +00:00
echo "VUE_APP_BACKEND_URL=https://mydomain.tld" > .env.local
2021-04-17 03:16:54 +00:00
```
2022-04-30 11:50:43 +00:00
Or un-set it if both frontend and backend will run on the same URL:
```
echo "VUE_APP_BACKEND_URL=" > .env.local
```
Compile:
2021-04-17 03:16:54 +00:00
```
npm run build
```
2022-09-20 21:32:30 +00:00
This will produce a static website in the `/dist` directory.
2022-04-30 11:50:43 +00:00
## Development
### Compiles and hot-reloads for development
```
npm start
```
2021-04-17 03:16:54 +00:00
### Run your unit tests
```
npm run test
```
### Lint files
```
npm run lint
```