I made an Angular build of my app using:
$ ng build
and uploaded the result onto my remote server:
I also have installed on the server an appropriate node version and Angular CLI. When I try to run the app $ ng serve
I see:
Error: This command is not available when running the Angular CLI outside a workspace.
My purpose is to run frontend and backend using Nginx as a proxy server. Maybe I shouldn’t use Angular CLI? I also have SSR in my app. I just wanted to leave all the internal Node.js kitchen (including the SSR magic) to Node.js and just add a Nginx reverse proxy.
Please, help me to figure out.
Here is my angular.json
build section:
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/market-service",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css",
"src/assets/header.css",
"src/assets/buttons.css"
],
"scripts": [],
"server": "src/main.server.ts",
"prerender": true,
"ssr": {
"entry": "server.ts"
}
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.development.ts"
}
]
}
},
"defaultConfiguration": "production"
}