A ERP-Nuxt is a project Enterprise Resource Planning
- Nuxt 2
- Laravel 8
- SPA or SSR
- VueI18n + ESlint + Bootstrap 4 + SBAdmin2 + Font Awesome 5
- Login, Employee, Presence, Salary, Activity Report
git clone https://github.com/dibaliqaja/erp-nuxt.gitcd erp-nuxt- Edit
.envand set your database connection details - (When installed via git clone or download, run
php artisan key:generateandphp artisan jwt:secret) php artisan migratenpm install
# start Laravel
php artisan serve
# start Nuxt
npm run devAccess your application at http://localhost:3000.
npm run build- Edit
client/nuxt.config.jsand setssr: true - Edit
.envto setAPP_URL=http://api.example.comandCLIENT_URL=http://example.com - Run
npm run buildandnpm run start
For Nginx you can add a proxy using the follwing location block:
server {
location / {
proxy_pass http://http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
In production you need a process manager to keep the Node server alive forever:
# install pm2 process manager
npm install -g pm2
# startup script
pm2 startup
# start process
pm2 start npm --name "laravel-nuxt" -- run start
# save process list
pm2 save
# list all processes
pm2 lAfter each deploy you'll need to restart the process:
pm2 restart laravel-nuxt Make sure to read the Nuxt docs.
- This project uses router-module, so you have to add the routes manually in
client/router.js. - If you want to separate this in two projects (client and server api), move
package.jsonintoclient/and remove config path option from the scripts section. Also make sure to add the env variables inclient/.env.
- This project use template from laravel-nuxt
