-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.js
49 lines (38 loc) · 1.57 KB
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var express = require('express'),
app = express(),
bodyParser = require('body-parser'),
mongoose = require('mongoose'),
meetupsController = require('./server/controllers/meetups-controller');
mongoose.connect('mongodb://localhost:27017/mean-demo');
app.use(bodyParser());
app.get('/', function (req, res) {
res.sendfile(__dirname + '/client/views/index.html');
});
app.use('/js', express.static(__dirname + '/client/js'));
app.use('/css', express.static(__dirname + '/client/css'));
app.use('/imgs', express.static(__dirname + '/client/imgs'));
app.use('/packages', express.static(__dirname + '/node_modules'));
app.use('/bootstrap', express.static(__dirname + '/node_modules/bootstrap/dist'));
//REST API
app.get('/api/meetups', meetupsController.list);
app.post('/api/meetups', meetupsController.create);
app.post('/api/fetch', meetupsController.getName);
//<<<<<<< HEAD
//<<<<<<< HEAD
//app.post('/api/CreateUser',meetupController.CreateUser);
//app.post('/api/Save',meetupController.SaveUser);
//app.get('/api/Findfriends',meetupController.Find);
//=======
//app.post('/api/CreateUser',meetupsController.CreateUser);
//app.post('/api/Save',meetupsController.SaveUser);
//app.get('/api/Findfriends',meetupsController.Find);
//>>>>>>> origin/master
//=======
app.post('/api/CreateUser',meetupsController.CreateUser);
app.post('/api/Save',meetupsController.SaveUser);
app.post('/api/Find',meetupsController.Find);
//>>>>>>> e242c96d54de80851525934414af9e98a4d3d8bc
app.listen(3000, function() {
console.log('I\'m Listening...');
})
//WTF