From 40eea45dfe56509bb15cf6880943dbdb3b44b35c Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 16 Mar 2021 20:41:45 +0200 Subject: [PATCH 1/2] make root actually / update versions https://github.com/fastify/fastify-example-todo/issues/12 --- app.js | 2 +- package.json | 16 ++++++++-------- services/{ => api}/auth.js | 0 services/{ => api}/todo.js | 0 4 files changed, 9 insertions(+), 9 deletions(-) rename services/{ => api}/auth.js (100%) rename services/{ => api}/todo.js (100%) diff --git a/app.js b/app.js index a277399..531380a 100644 --- a/app.js +++ b/app.js @@ -29,7 +29,7 @@ module.exports = function (fastify, opts, next) { // define your routes in one of these fastify.register(AutoLoad, { dir: path.join(__dirname, 'services'), - options: Object.assign({ prefix: '/api' }, opts) + options: Object.assign({ prefix: '/' }, opts) }) // Make sure to call next when done diff --git a/package.json b/package.json index e0028f1..06d41c4 100644 --- a/package.json +++ b/package.json @@ -18,14 +18,14 @@ "author": "Cemre Mengu ", "license": "MIT", "dependencies": { - "fastify": "^2.0.0", - "fastify-autoload": "^0.6.0", - "fastify-cli": "^0.27.0", - "fastify-cors": "^3.0.3", - "fastify-helmet": "^3.0.0", - "fastify-jwt": "^0.8.0", - "fastify-mongodb": "^1.0.0", - "fastify-plugin": "^1.4.0" + "fastify": "3.x.x", + "fastify-autoload": "3.x.x", + "fastify-cli": "2.x.x", + "fastify-cors": "3.x.x", + "fastify-helmet": "5.x.x", + "fastify-jwt": "2.x.x", + "fastify-mongodb": "1.x.x", + "fastify-plugin": "3.x.x" }, "devDependencies": { "mongo-clean": "^2.0.0", diff --git a/services/auth.js b/services/api/auth.js similarity index 100% rename from services/auth.js rename to services/api/auth.js diff --git a/services/todo.js b/services/api/todo.js similarity index 100% rename from services/todo.js rename to services/api/todo.js From bee75a41fb41725f0b3c6029e1963ed87c88e84d Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 16 Mar 2021 22:05:54 +0200 Subject: [PATCH 2/2] revert upgrades --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 06d41c4..e0028f1 100644 --- a/package.json +++ b/package.json @@ -18,14 +18,14 @@ "author": "Cemre Mengu ", "license": "MIT", "dependencies": { - "fastify": "3.x.x", - "fastify-autoload": "3.x.x", - "fastify-cli": "2.x.x", - "fastify-cors": "3.x.x", - "fastify-helmet": "5.x.x", - "fastify-jwt": "2.x.x", - "fastify-mongodb": "1.x.x", - "fastify-plugin": "3.x.x" + "fastify": "^2.0.0", + "fastify-autoload": "^0.6.0", + "fastify-cli": "^0.27.0", + "fastify-cors": "^3.0.3", + "fastify-helmet": "^3.0.0", + "fastify-jwt": "^0.8.0", + "fastify-mongodb": "^1.0.0", + "fastify-plugin": "^1.4.0" }, "devDependencies": { "mongo-clean": "^2.0.0",