Skip to content

Instantly share code, notes, and snippets.

View artyomsveshnikov's full-sized avatar

Artyom Sveshnikov artyomsveshnikov

View GitHub Profile
@artyomsveshnikov
artyomsveshnikov / server_for_vue.js
Created August 22, 2021 10:32
Simple server.js for Vue static site
//Install express server
const express = require('express');
const path = require('path');
const app = express();
// Serve only the static files form the dist directory
app.use(express.static(__dirname + '/dist'));
app.get('/*', function(req,res) {
@artyomsveshnikov
artyomsveshnikov / server_for_react.js
Created August 22, 2021 09:59
Simple server.js for React static site
//Install express server
const express = require('express');
const path = require('path');
const app = express();
// Serve only the static files form the dist directory
app.use(express.static(__dirname + '/build'));
app.get('/*', function(req,res) {
@artyomsveshnikov
artyomsveshnikov / server.js
Created August 22, 2021 09:22
Simple server.js for Angular static site
//Install express server
const express = require('express');
const path = require('path');
const app = express();
// Serve only the static files form the dist directory
app.use(express.static(__dirname + '/dist/<appName>'));
app.get('/*', function(req,res) {