Skip to content

Commit

Permalink
Removing dist
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbour committed Jun 14, 2019
1 parent ce54bcc commit a2f8be7
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 778 deletions.
34 changes: 34 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
var path = require("path");
var express = require("express");

var DIST_DIR = path.join(__dirname, "dist");
var STATIC_DIR = path.join(__dirname, "static");
var PORT = 3000;
var app = express();

//Serving the files on the dist folder
app.use(express.static(DIST_DIR));
app.use("/static",express.static(STATIC_DIR));

app.use(function(req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});

//Send index.html when the user access the web
app.get("*", function (req, res) {
res.sendFile(path.join(DIST_DIR, "index.html"));
});

app.use(function(err, req, res, next) {
res.locals.message = err.message;
res.locals.error = req.app.get('env') === 'development' ? err : {};

// render the error page
res.status(err.status || 500);
});

app.listen(PORT);

module.exports = app;
1 change: 0 additions & 1 deletion dist/build.js

This file was deleted.

Binary file removed dist/build.js.gz
Binary file not shown.
Binary file removed dist/feather.eot
Binary file not shown.
759 changes: 0 additions & 759 deletions dist/feather.svg

This file was deleted.

Binary file removed dist/feather.ttf
Binary file not shown.
Binary file removed dist/feather.woff
Binary file not shown.
16 changes: 0 additions & 16 deletions dist/index.html

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
"description": "Rating front-end",
"author": "Joey Schluchter <[email protected]>",
"scripts": {
"build": "webpack",
"build": "webpack -p",
"postinstall": "npm run build",
"start": "webpack-dev-server"
"start": "NODE_ENV='development' node app.js"
},
"dependencies": {
"at-ui": "^1.2.0-beta",
"at-ui-style": "^1.3.2",
"axios": "^0.19.0",
"compression-webpack-plugin": "^1.1.3",
"express": "^4.17.1",
"numeral": "^2.0.6",
"vue": "^2.3.4",
"webpack": "^3.0.0",
Expand Down

0 comments on commit a2f8be7

Please sign in to comment.