Skip to content

Prepare a basic project created with `ng new` to be runnable on heroku

License

Notifications You must be signed in to change notification settings

Funkygeek/angular-heroku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-heroku

This node application prepares an Angular application to be able to be used on the Heroku environment.

Assumptions

It is assumed your package already has

npm install @angular/cli@latest @angular/compiler-cli --save-dev

What this application does

  • Copies @angular/cli and @angular/compiler-cli from devDependencies to dependencies

  • Adds "postinstall": "ng build --aot -prod" to scripts

  • Adds Node and NPM engines

    "engines":{
          "node":"11.9.0", 
          "npm":"6.11.3"
    };
    
  • Copies "typescript" from devDependencies to dependencies

  • Install install [email protected]

  • Install Express server with npm install express path --save

  • Creates the server.js file with the correct dist directory

  • Change the "start" command to node server.js

References

About

Prepare a basic project created with `ng new` to be runnable on heroku

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published