Skip to content

Instantly share code, notes, and snippets.

View florimondmanca's full-sized avatar
🌱

Florimond Manca florimondmanca

🌱
View GitHub Profile
@florimondmanca
florimondmanca / nginx.conf
Created July 15, 2018 08:01
Simple Nginx configuration for serving an Angular build
server {
listen 80;
# server_name YOUR_SERVER_NAME;
root /path/on/server/to/dist;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
@florimondmanca
florimondmanca / server.js
Last active July 15, 2018 07:59
Lightweight Angular production server
/*
npm install --save express morgan
*/
const express = require('express');
const morgan = require('morgan');
const app = express();
app.use(express.static(__dirname + '/dist'));
app.use(morgan('combined'))
app.get('*', function(req, res) {