Demonstration project on how to develop and run angular project with NodeJS project
Open on Visual Studio Code, from Powershell
npm uninstall -g @angular-cli
npm install -g @angular/cli@latest
ng version
Angular CLI: 11.0.2 Node: 12.14.1 OS: win32 x64
npm install express --save
npm install nodemon --save-dev
npm install
cd my-app
npm install
return to home folder...
npm run build
cd my-app
npm run build
npm run dev
cd my-app\npm start
return to home folder...
npm start
Copy my-app\dist in a folder
On the this main folder, copy package.jason, server.bundle.js, server.js
create a zip, such as raspberry.zip and copy it on the target:
scp raspberry.zip [email protected]:/var/www/
From Raspberry shell, unzip it:
unzip raspberry.zip
Finally start:
node server.bundle.js &