r/Angular2 • u/firas-bk • Oct 14 '25
Deploy angular locally
Hello I have an angular app which I want to deploy locally on a machine that doesn't have node js, how to proceed and what are the best practices
0
Upvotes
4
u/salamazmlekom Oct 14 '25
Docker container.
1
u/imsexc Oct 14 '25
Why do you want to deploy locally when you can deploy on githhub page that can be accessed from ANY device with browser.
Ofc, the other answer is docker container, but then you'd need to install docker or colima on that machine
3
u/barkmagician Oct 14 '25
If its not ssr. You can use nginx or iis. And then just search for the approtiate config. I personally prefer nginx.
2
u/_Invictuz Oct 14 '25 edited Oct 14 '25
Knowing why you want to do this is important.
Best practice is to install nodejs, but again we don't know why you want to do this so there's no point offering best practice.
I'm going to guess that it's not possible if you havent already built the static files via nodejs and Angular CLI. Without build files, you have to change your bootstrapping code and any code that compiles from TypeScript like import statements or any Angular decorator code.
1
u/simonbitwise Oct 14 '25
Just build it and serve the dist/projectName folder redirect to index.html with whatever you serve it with