Answers for "angular fire deploy"

4

how to deploy angular site firebase

In the terminal:
$ ng build --prod
$ npm install -g firebase-tools
$ firebase login
$ firebase init //choose dist/<project-name> as public directory
//index.html should not be overwritten
$ firebase deploy
Posted by: Guest on November-03-2020
0

host angular app on node server

const express = require('express');
const http = require('http');
const path = require('path');

const app = express();

const port = process.env.PORT || 3001;

app.use(express.static(__dirname + '/dist/my-app-name'));

app.get('/*', (req, res) => res.sendFile(path.join(__dirname)));

const server = http.createServer(app);

server.listen(port, () => console.log(`App running on: http://localhost:${port}`));
Posted by: Guest on November-12-2020

Code answers related to "angular fire deploy"

Code answers related to "Javascript"

Browse Popular Code Answers by Language