M
M
mspuz2019-01-10 22:48:55
Angular
mspuz, 2019-01-10 22:48:55

Compile back-end, how?

Good afternoon. Developed an application with back-end and front-end. I have express on the back, front is written with Angular. Everything works in NodeJs environment. It's build time for production. If I run the command "ng build" from the root folder of the project - it gives an error

The build command requires to be run in an Angular project, but a project definition could not be found.

If I run this command from the project / client folder, in which the front code is located, everything compiles without problems.
Now I don't understand how. If I have a compiled front, then how do I put it on the server? Or am I confusing something?
The project code is posted on github

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor Zhivagin, 2019-01-11
@Krasnodar_etc

The backend does not compile (more correctly, it does not compile), especially with the command from angular-cli :)
What is there to compile? And why? The backend is transferred to the production server in exactly the same form

A
Arthur Mustafin, 2019-01-10
@virtual_hack2root

The build should take place in the client folder, with the --prod option, as far as I understand
https://github.com/mymspuz/mymoney/pull/1
on Windows (Linux) change the build script to this, get the following
"build": "cd . /client && npm i && ng build --prod && cd ..",
"npm run-script build":
Get the build result in the folder "client/dist/client"
5c37accb62ab5466221939.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question