!!! Note: this project uses the node-sass npm package, which, on windows machines requires the node-gyp prerequisites.
Install all dependencies by running npm install in project's root folder.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.
To run the files in the dist folder you can use either apache, nginx.
You can also install http-server and use it to run the project:
$ npm i -g http-server
$ http-server dist/panalpinaSee https://www.npmjs.com/package/http-server for more details on http-server.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.
Make sure you have latest Heroku CLI installed:
$ npm install -g heroku-cliLogin to heroku:
$ heroku loginCreate the heroku application:
$ heroku apps:create <application-name>Replace <application-name> with the name of the application you'd like. eg:
$ heroku apps:create pan-app-tcBuild the application:
$ ng build -prodAdd the code to your heroku instance:
$ git add .
$ git add -f dist
$ git commit -m "init"Finally, deploy to your heroku instance:
$ git push heroku masterSee your running app at https://<application-name>.heroku.com, in the given example it would be: https://pan-app-tc.herokuapp.com/, or simply open it by running:
$ heroku open!!!NOTE: the server.js file is only for serving files on heroku. do not use it on localhost!
Please find the env configuration files located in src/environments/, as follows:
environment.tsconfig file for development environmentenvironment.prod.tsconfig file for production environment
The available configurations are:
productionsets current environment as production or notapiMock urls for the api (locations to json files, as of this moment)gMap.apiKeyThe google maps api key to use in the application. It is required in api v3. Check here to see how to get one.gmapConfig the default center & zoom level for the map