diff --git a/index.js b/index.js index 584cbe3..5523682 100644 --- a/index.js +++ b/index.js @@ -5,4 +5,8 @@ test hotfix refactor -*/ \ No newline at end of file +1) GET - READ DATA +2) POST - CREATE DATA +3) PUT - UPDATE DATA +4) DELETE - DELETE DATA +*/ diff --git a/package.json b/package.json index 13f6064..900f871 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node ./server.js" }, "repository": { "type": "git", diff --git a/server.js b/server.js index fe09224..c5314fa 100644 --- a/server.js +++ b/server.js @@ -2,18 +2,41 @@ const express = require('express'); const app = express(); +const cars = [ + 'Audi', + 'Volga', + 'BMW', +]; +// filter +// eslint-disable-next-line func-names +// const filter = function () { +// const tmp = {}; +// // eslint-disable-next-line no-return-assign +// return cars.filter(a => (a in tmp ? 0 : tmp[a] = 1)); +// }; +// filter + app.get('/', (req, res) => { - res.send('