!!! 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/panalpina
See 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-cli
Login to heroku:
$ heroku login
Create 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-tc
Build the application:
$ ng build -prod
Add 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 master
See 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.ts
config file for development environmentenvironment.prod.ts
config file for production environment
The available configurations are:
production
sets current environment as production or notapi
Mock urls for the api (locations to json files, as of this moment)gMap.apiKey
The google maps api key to use in the application. It is required in api v3. Check here to see how to get one.gmap
Config the default center & zoom level for the map