Skip to content

Commit eae7bf2

Browse files
committed
Initial commit
0 parents  commit eae7bf2

20 files changed

+1131
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# pretendo_website

assets/images/Pretendo_Icon.png

8.75 KB
Loading

assets/images/Pretendo_Network.png

24.1 KB
Loading
Loading
9.75 KB
Loading
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<browserconfig>
3+
<msapplication>
4+
<tile>
5+
<square150x150logo src="/images/favicons/mstile-150x150.png"/>
6+
<TileColor>#603cba</TileColor>
7+
</tile>
8+
</msapplication>
9+
</browserconfig>
894 Bytes
Loading
1.49 KB
Loading

assets/images/favicons/favicon.ico

14.7 KB
Binary file not shown.
7.46 KB
Loading
Loading
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "",
3+
"short_name": "",
4+
"icons": [
5+
{
6+
"src": "/images/favicons/android-chrome-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
}
10+
],
11+
"theme_color": "#ffffff",
12+
"background_color": "#ffffff",
13+
"display": "standalone"
14+
}

index.js

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//////////////////////////////////////////////////////////////////
2+
/// ///
3+
/// Dependencies ///
4+
/// ///
5+
//////////////////////////////////////////////////////////////////
6+
7+
let port = 80,
8+
path = require('path'),
9+
express = require('express'),
10+
pug = require('pug'),
11+
colors = require('colors'),
12+
morgan = require('morgan'),
13+
app = express(),
14+
api_router = express.Router();
15+
16+
// Routes
17+
const ROUTES = {
18+
HOME: require('./routes/home'),
19+
}
20+
21+
// START APPLICATION
22+
app.set('etag', false);
23+
app.use(express.static(__dirname + '/assets'));
24+
25+
// Middleware
26+
app.use(morgan('dev'));
27+
app.use(express.json());
28+
app.use(express.urlencoded({
29+
extended: true
30+
}));
31+
32+
// Views
33+
app.set('views', __dirname + '/views');
34+
app.set('view engine', 'pug');
35+
36+
app.engine('pug', pug.__express);
37+
38+
// Setup routes
39+
app.use('/', ROUTES.HOME); // Root
40+
41+
// 404 handler
42+
app.use((request, response) => {
43+
response.status(404);
44+
response.send();
45+
});
46+
47+
// non-404 error handler
48+
app.use((error, request, response) => {
49+
let status = error.status || 500;
50+
response.status(status);
51+
response.json({
52+
app: 'api',
53+
status: status,
54+
error: error.message
55+
});
56+
});
57+
58+
// Starts the server
59+
app.listen(port, () => {
60+
console.log('Server'.blue + ' started '.green.bold + 'on port '.blue + new String(port).yellow);
61+
});

0 commit comments

Comments
 (0)