This is a project to monitor electric system via mobile phone and build with Vue.js and Express.js, function include client login, logout, limit user to login single account, show data point with interactive charts.
Front-End:
- Vue.js
- chart.js
- jwt
- Webpack
Back-End:
- Express.js
- jwt
- RestAPI
- MySQL
- Redis
- Docker
- Nginx
- Pm2
npm install
npm run serve
npm run build
serve -s dist
=======
docker build -t my-app .
docker run -d -p 8080:80 my-app
=======
- run redis-server(docker)
- run linsql(docker)
- run npm start under server folder
docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd \
-S localhost -U SA -P "YourStrong!Password" \
-Q 'ALTER LOGIN SA WITH PASSWORD="<NewStrong!PassWord>"
docker exec -it sql "bash"
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "<YourStrong!Password>"
npm i pm2 -g
tutorial : https://larrylu.blog/nodejs-pm2-cluster-455ffbd7671
cd into server directory and type
pm2 start dist
cd into client directory and type
pm2 start client.js