Skip to content

Commit 9dd8535

Browse files
LMAO
1 parent 1a36c67 commit 9dd8535

File tree

2,384 files changed

+274633
-959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,384 files changed

+274633
-959
lines changed

.DS_Store

0 Bytes
Binary file not shown.

app.js

+40-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,42 @@
11
var express = require('express');
2+
var mongoose = require('mongoose');
23
var bodyParser = require('body-parser');
4+
var passport = require('passport');
5+
var session = require('express-session');
6+
var MongoStore = require('connect-mongo')(session);
7+
var LocalStrategy = require('passport-local').Strategy;
38

49
var app = express();
510

11+
//Make new databse
12+
mongoose.connect("mongodb://MINET:[email protected]:31583/minetx");
13+
var db = mongoose.connection;
14+
//If Mongo Error
15+
db.on('error', console.error.bind(console, 'connection error'));
16+
17+
//Setting up sessions+cookies
18+
app.use(session({
19+
secret: 'JagdishKumar',
20+
resave: false,
21+
saveUninitialized: false,
22+
store: new MongoStore({
23+
mongooseConnection: db
24+
})
25+
}));
26+
27+
app.use(passport.initialize());
28+
app.use(passport.session());
29+
30+
var User = require('./models/user');
31+
passport.use(new LocalStrategy(User.authenticate()));
32+
passport.serializeUser(User.serializeUser());
33+
passport.deserializeUser(User.deserializeUser());
34+
35+
app.use((req, res, next) => {
36+
res.locals.currentUser = req.user;
37+
next();
38+
});
39+
640
//Setting up body-parser
741
app.use(bodyParser.json());
842
app.use(bodyParser.urlencoded({ extended: false }));
@@ -15,24 +49,21 @@ app.set('view engine', 'pug');
1549
app.set('views', __dirname + '/views');
1650

1751
//Setting routes
18-
var routes = require('./routes/index');
19-
app.use('/', routes);
52+
var home = require('./routes/index');
53+
app.use('/', home);
54+
55+
var dashboard = require('./routes/dashboard');
56+
app.use('/dashboard', dashboard);
2057

2158
//404
2259
app.use((res, req, next) => {
23-
var err = new Error('File not found!');
24-
err.status = 404;
2560
next(err);
2661
});
2762

2863
//Error Handler
2964
app.use((err, req, res, next) => {
3065
res.status(err.status || 500);
31-
res.render('error', {
32-
title: 'Error',
33-
message: err.message,
34-
error: {}
35-
});
66+
res.render('error');
3667
});
3768

3869
//Listening

config.codekit3

+170-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,176 @@
130130
"oAP": "\/build\/routes",
131131
"oF": 0
132132
},
133-
"\/style.scss": {
133+
"\/stylesheets\/modules\/_base.scss": {
134+
"aP": 0,
135+
"bl": 0,
136+
"dP": 10,
137+
"dS": 0,
138+
"ft": 4,
139+
"ma": 0,
140+
"oA": 1,
141+
"oAP": "\/stylesheets\/css\/_base.css",
142+
"oF": 0,
143+
"oS": 0,
144+
"uL": 1
145+
},
146+
"\/stylesheets\/modules\/_colors.scss": {
147+
"aP": 0,
148+
"bl": 0,
149+
"dP": 10,
150+
"dS": 0,
151+
"ft": 4,
152+
"ma": 0,
153+
"oA": 1,
154+
"oAP": "\/stylesheets\/css\/_colors.css",
155+
"oF": 0,
156+
"oS": 0,
157+
"uL": 1
158+
},
159+
"\/stylesheets\/modules\/_framework.scss": {
160+
"aP": 0,
161+
"bl": 0,
162+
"dP": 10,
163+
"dS": 0,
164+
"ft": 4,
165+
"ma": 0,
166+
"oA": 1,
167+
"oAP": "\/stylesheets\/css\/_framework.css",
168+
"oF": 0,
169+
"oS": 0,
170+
"uL": 1
171+
},
172+
"\/stylesheets\/modules\/_utility.scss": {
173+
"aP": 0,
174+
"bl": 0,
175+
"dP": 10,
176+
"dS": 0,
177+
"ft": 4,
178+
"ma": 0,
179+
"oA": 1,
180+
"oAP": "\/stylesheets\/css\/_utility.css",
181+
"oF": 0,
182+
"oS": 0,
183+
"uL": 1
184+
},
185+
"\/stylesheets\/partials\/_dashboard.scss": {
186+
"aP": 0,
187+
"bl": 0,
188+
"dP": 10,
189+
"dS": 0,
190+
"ft": 4,
191+
"ma": 0,
192+
"oA": 1,
193+
"oAP": "\/stylesheets\/css\/_dashboard.css",
194+
"oF": 0,
195+
"oS": 0,
196+
"uL": 1
197+
},
198+
"\/stylesheets\/partials\/_events.scss": {
199+
"aP": 0,
200+
"bl": 0,
201+
"dP": 10,
202+
"dS": 0,
203+
"ft": 4,
204+
"ma": 0,
205+
"oA": 1,
206+
"oAP": "\/stylesheets\/css\/_events.css",
207+
"oF": 0,
208+
"oS": 0,
209+
"uL": 1
210+
},
211+
"\/stylesheets\/partials\/_faqs.scss": {
212+
"aP": 0,
213+
"bl": 0,
214+
"dP": 10,
215+
"dS": 0,
216+
"ft": 4,
217+
"ma": 0,
218+
"oA": 1,
219+
"oAP": "\/stylesheets\/css\/_faqs.css",
220+
"oF": 0,
221+
"oS": 0,
222+
"uL": 1
223+
},
224+
"\/stylesheets\/partials\/_forms.scss": {
225+
"aP": 0,
226+
"bl": 0,
227+
"dP": 10,
228+
"dS": 0,
229+
"ft": 4,
230+
"ma": 0,
231+
"oA": 1,
232+
"oAP": "\/stylesheets\/css\/_forms.css",
233+
"oF": 0,
234+
"oS": 0,
235+
"uL": 1
236+
},
237+
"\/stylesheets\/partials\/_home.scss": {
238+
"aP": 0,
239+
"bl": 0,
240+
"dP": 10,
241+
"dS": 0,
242+
"ft": 4,
243+
"ma": 0,
244+
"oA": 1,
245+
"oAP": "\/stylesheets\/css\/_home.css",
246+
"oF": 0,
247+
"oS": 0,
248+
"uL": 1
249+
},
250+
"\/stylesheets\/partials\/_intro.scss": {
251+
"aP": 0,
252+
"bl": 0,
253+
"dP": 10,
254+
"dS": 0,
255+
"ft": 4,
256+
"ma": 0,
257+
"oA": 1,
258+
"oAP": "\/stylesheets\/css\/_intro.css",
259+
"oF": 0,
260+
"oS": 0,
261+
"uL": 1
262+
},
263+
"\/stylesheets\/partials\/_responsive.scss": {
264+
"aP": 0,
265+
"bl": 0,
266+
"dP": 10,
267+
"dS": 0,
268+
"ft": 4,
269+
"ma": 0,
270+
"oA": 1,
271+
"oAP": "\/stylesheets\/css\/_responsive.css",
272+
"oF": 0,
273+
"oS": 0,
274+
"uL": 1
275+
},
276+
"\/stylesheets\/partials\/_schedule.scss": {
277+
"aP": 0,
278+
"bl": 0,
279+
"dP": 10,
280+
"dS": 0,
281+
"ft": 4,
282+
"ma": 0,
283+
"oA": 1,
284+
"oAP": "\/stylesheets\/css\/_schedule.css",
285+
"oF": 0,
286+
"oS": 0,
287+
"uL": 1
288+
},
289+
"\/stylesheets\/partials\/_travel.scss": {
290+
"aP": 0,
291+
"bl": 0,
292+
"dP": 10,
293+
"dS": 0,
294+
"ft": 4,
295+
"ma": 0,
296+
"oA": 1,
297+
"oAP": "\/stylesheets\/css\/_travel.css",
298+
"oF": 0,
299+
"oS": 0,
300+
"uL": 1
301+
},
302+
"\/stylesheets\/style.scss": {
134303
"aP": 1,
135304
"bl": 0,
136305
"dP": 10,

models/logs.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var mongoose = require('mongoose');
2+
var Schema = mongoose.Schema;
3+
4+
var LogsSchema = new Schema({
5+
username: String,
6+
action: String,
7+
time: Date
8+
});
9+
10+
11+
var Logs = mongoose.model('Logs', LogsSchema);
12+
module.exports = Logs;

0 commit comments

Comments
 (0)