Commit 3f0b4691 authored by Filip Kováč's avatar Filip Kováč
Browse files

updates

parent b879b2e1
`npx clinic bubbleprof --autocannon [ -c 5 -a 500 /articles?url=sample-article-2 ] -- node ./dist/index.js`
`autocannon -5 -a 500 http://localhost:3000/articles`
`docker run -d --name sample-cms-mongo -p 27888:27017 -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=passwd mongo`
`docker start sample-cms-mongo`
`node NODE_V8_COVERAGE=./cov ./src/index.js`
\ No newline at end of file
This diff is collapsed.
......@@ -5,7 +5,8 @@
"main": "./src/index.js",
"scripts": {
"production": "node ./src/index.js",
"start": "nodemon -e js,yaml ./src/index.js --delay 0.5"
"start": "nodemon -e js,yaml ./src/index.js --delay 0.5",
"reinstall": "rm -rf node_modules package-lock.json && npm i"
},
"author": "Filip Kováč",
"license": "ISC",
......@@ -14,6 +15,7 @@
"express": "^4.17.1",
"inspector-api": "^1.0.3",
"mongodb": "^3.6.4",
"njstrace": "^1.2.1",
"nodemon": "^1.19.0",
"slugify": "^1.4.6"
},
......
......@@ -3,7 +3,7 @@ const setupCmsDb = async (db) => {
await articlesDB.dropIndexes();
await articlesDB.createIndex({ authorId: 1 });
await articlesDB.createIndex({ title: 1 }, { unique: true });
// await articlesDB.createIndex({ title: 1 }, { unique: true });
};
module.exports = setupCmsDb;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment