Based on Angular 8 Starter
npm install
npm run dev
- for developmentnpm run start
- for client renderingnpm run ssr
- for server-side renderingnpm run server
- to start the servernpm run build:universal
- for assembly in release
npm run prod
Because ng serve does not work with service workers, you must use a separate HTTP server to test your project locally. You can use any HTTP server. The example below uses the http-server package from npm. To reduce the possibility of conflicts and avoid serving stale content, test on a dedicated port and disable caching.
To serve the directory containing your web files with http-server, run the following command:
cd dist/browser
http-server -p 8080
Open /src/environments/environment.ts
and add your Firebase configuration:
export const environment = {
production: false,
firebase: {
apiKey: '<your-key>',
authDomain: '<your-project-authdomain>',
databaseURL: '<your-database-URL>',
projectId: '<your-project-id>',
storageBucket: '<your-storage-bucket>',
messagingSenderId: '<your-messaging-sender-id>'
}
};