Skip to content

Commit 8158b67

Browse files
committed
admin/products 추가
1 parent 7d6d246 commit 8158b67

1,779 files changed

Lines changed: 247670 additions & 4 deletions

File tree

Some content is hidden

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

app.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1-
//express module 설치했으니 require('express')사용가능
21

2+
//express module 설치했으니 require('express')사용가능
33
var express = require('express');
44

5+
//MongoDB 접속 express아래에 위치해야함!
6+
var mongoose = require('mongoose');
7+
var autoIncrement = require('mongoose-auto-increment');//key value 생성을 위한 모듈
8+
9+
var db = mongoose.connection;
10+
db.on('error', console.error);
11+
db.once('open', function () {
12+
console.log('mongodb connect');//접속 성공됬는지 확인하기 위해
13+
});
14+
15+
var connect = mongoose.connect('mongodb://127.0.0.1:27017/fastcampus', { useMongoClient: true });
16+
autoIncrement.initialize(connect);
17+
18+
19+
var admin = require('./routes/admin');
20+
521
var app = express();
622
var port = 3000;
723

@@ -10,6 +26,8 @@ app.get('/', function (req, res) {//get방식으로 보내기
1026
res.send('first app12');
1127
});
1228

29+
app.use('/admin', admin);
30+
1331
app.listen(port, function () { //서버에 띄어주는
1432
console.log('Express listening on port', port);
1533
});

node_modules/.bin/semver

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/async/CHANGELOG.md

Lines changed: 223 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/async/LICENSE

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/async/README.md

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/async/apply.js

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/async/applyEach.js

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/async/applyEachSeries.js

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/async/asyncify.js

Lines changed: 93 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)