Skip to content

Commit 948aba4

Browse files
committedJun 3, 2019
chore(examples): refactor to expose correct api paths
1 parent 35919d2 commit 948aba4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎examples/app.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
const _ = require('lodash');
33
const { connect } = require('@lykmapipo/mongoose-common');
44
const { get, mount, start } = require('@lykmapipo/express-common');
5-
6-
const { info, fileRouter, BUCKETS, apiVersion } = require(`${__dirname}/..`);
5+
const { apiVersion, fileRouter } = require(`${__dirname}/..`);
76

87
// establish mongodb connection
98
connect(error => {
@@ -29,7 +28,7 @@ connect(error => {
2928
}
3029

3130
// start http server
32-
_.forEach(BUCKETS, bucket => {
31+
_.forEach(['files', 'images', 'audios', 'videos', 'documents'], bucket => {
3332
const path = `files/${bucket}`;
3433
console.log(`visit http://0.0.0.0:${env.PORT}/${apiVersion}/${path}`);
3534
});

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"cmt": "git add -A && git-cz",
1818
"changelog": "changelog",
1919
"chore:deps": "ncu -u && npm install --save",
20-
"dev": "npm run seed && npm run start",
20+
"dev": "npm run start",
2121
"start": "BASE_PATH=./examples node ./examples/app.js",
2222
"seed": "BASE_PATH=./examples node ./examples/seed.js"
2323
},

0 commit comments

Comments
 (0)
Please sign in to comment.