From bc7f09494c45b92b055fab738a661e6319f2cf55 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 14 Sep 2023 16:28:46 +0200 Subject: [PATCH 1/2] chore: trim whitespace/newlines --- README.md | 8 ++++---- backend/middleware/errors.js | 2 -- backend/tests/routes.js | 1 - frontend/src/components/MapView.js | 2 +- frontend/src/components/NewMapModal.js | 2 +- frontend/src/controllers/Router.js | 3 +-- server.js | 1 - 7 files changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ec8fe84..ce57ad6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ethermap +# ethermap > This is very much a janky _earlydays_ project. All help is welcome! @@ -9,18 +9,18 @@ An interactive map tool. A tool for collaborative planning on maps. Anyone can c Ethermap is built in JavaScript (soz) using NodeJS. To install you can do so by running the following commands. To install all dependencies for the front and backend : -```sh +```sh $ npm install ``` You will then need to create a `.env` file in the root folder. There is a `.env.template` that you can copy as a guide. For a dev server you can simply copy and paste the template leaving it as is. Then migrate the database structure : -```sh +```sh $ npm run migrate:latest ``` Then you should be able to run the dev server : -```sh +```sh $ npm run dev ``` diff --git a/backend/middleware/errors.js b/backend/middleware/errors.js index 1976764..aace972 100644 --- a/backend/middleware/errors.js +++ b/backend/middleware/errors.js @@ -2,5 +2,3 @@ export default (err, _, res) => { res.status(500).json({ message: err.message }) } - - diff --git a/backend/tests/routes.js b/backend/tests/routes.js index ea3959a..969e5d9 100644 --- a/backend/tests/routes.js +++ b/backend/tests/routes.js @@ -89,4 +89,3 @@ test.serial('post "/api/point/add" with incorrect data keys throws 500 error', a test.after(async () => { await db.migrate.down() }) - diff --git a/frontend/src/components/MapView.js b/frontend/src/components/MapView.js index 46c49cb..0479a3a 100644 --- a/frontend/src/components/MapView.js +++ b/frontend/src/components/MapView.js @@ -58,7 +58,7 @@ class MapView extends LitElement { attribution: '© OpenStreetMap' }).addTo(this.leaflet) - + // track mouse movement this.leaflet.on('mousemove', (evt) => { this.socket.emit('mousemove', evt.latlng) diff --git a/frontend/src/components/NewMapModal.js b/frontend/src/components/NewMapModal.js index 2aeba90..0428dec 100644 --- a/frontend/src/components/NewMapModal.js +++ b/frontend/src/components/NewMapModal.js @@ -67,6 +67,6 @@ class NewMapModal extends LitElement { } ` } -} +} window.customElements.define('newmap-modal', NewMapModal) diff --git a/frontend/src/controllers/Router.js b/frontend/src/controllers/Router.js index b5fc330..b2c861f 100644 --- a/frontend/src/controllers/Router.js +++ b/frontend/src/controllers/Router.js @@ -13,7 +13,7 @@ if (!globalThis.URLPattern) { export default new Router({ fallback: '/404', routes: [ - { + { path: '/', title: 'ethermap | index', render: () => html` @@ -33,4 +33,3 @@ export default new Router({ } ] }) - diff --git a/server.js b/server.js index 18fcb0f..649cb54 100644 --- a/server.js +++ b/server.js @@ -15,4 +15,3 @@ const io = new Server(server) ViteExpress.bind(App, server) Socket(io) - -- 2.39.5 From 2103f9e3cc872ca6aed297fccd9e199db6d25ac3 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 14 Sep 2023 16:28:57 +0200 Subject: [PATCH 2/2] fix: Ethermap is now page title --- frontend/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/index.html b/frontend/index.html index 13e6c77..d66c4c4 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,7 +5,7 @@ - Vite App + Ethermap