You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
7 months ago | |
---|---|---|
dist | 3 years ago | |
public | 3 years ago | |
src | 3 years ago | |
.env.production | 3 years ago | |
.gitignore | 3 years ago | |
COPYING | 3 years ago | |
README.md | 7 months ago | |
babel.config.js | 3 years ago | |
package-lock.json | 7 months ago | |
package.json | 7 months ago |
README.md
Sphere frontent
L'esfera has two parts.
- The server. Written with the FastAPI python framework.
- The frontend (this document). Written in Vuejs2
You will need a web server like nginx or apache2
Get the code
cd /var/www/
mkdir ./esfera
wget https://farga.exo.cat/buttle/sphere-frontend/archive/main.tar.gz
tar zxvf main.tar.gz --strip-components=1 -C esfera
Configure an nginx host
Edit /etc/hosts
and add an entry to point to the esfera-server
127.0.0.1 esfera-server
Edit a new nginx hosts file
server {
listen 80;
server_name my_domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name my_domain.com;
ssl_certificate /etc/letsencrypt/live/my_domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my_domain.com/privkey.pem;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
root /var/www/esfera/dist;
index index.html;
}
location = /favicon.ico {
alias /var/www/esfera/dist/favicon.ico;
}
location /api/ {
proxy_pass http://esfera-server:5050/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass_header server;
}
access_log /var/log/nginx/esfera.access.log;
error_log /var/log/nginx/esfera.error.log notice;
}
Development installation
You will need node and npm installed
Get the code
git clone https://gitlab.com/la-loka/esfera/esfera-vue
or
git clone git@gitlab.com/la-loka/esfera/esfera-vue
Create .env.development
to define the esfera api server
VUE_APP_API_SERVER="http://localhost:5050"
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Lints and fixes files
npm run lint