Compare commits

..

No commits in common. "chore-tidy-and-title" and "main" have entirely different histories.

8 changed files with 13 additions and 8 deletions

View File

@ -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
```

View File

@ -2,3 +2,5 @@
export default (err, _, res) => {
res.status(500).json({ message: err.message })
}

View File

@ -89,3 +89,4 @@ test.serial('post "/api/point/add" with incorrect data keys throws 500 error', a
test.after(async () => {
await db.migrate.down()
})

View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ethermap</title>
<title>Vite App</title>
<!-- leaflet -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"

View File

@ -58,7 +58,7 @@ class MapView extends LitElement {
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(this.leaflet)
// track mouse movement
this.leaflet.on('mousemove', (evt) => {
this.socket.emit('mousemove', evt.latlng)

View File

@ -67,6 +67,6 @@ class NewMapModal extends LitElement {
}
`
}
}
}
window.customElements.define('newmap-modal', NewMapModal)

View File

@ -13,7 +13,7 @@ if (!globalThis.URLPattern) {
export default new Router({
fallback: '/404',
routes: [
{
{
path: '/',
title: 'ethermap | index',
render: () => html`
@ -33,3 +33,4 @@ export default new Router({
}
]
})

View File

@ -15,3 +15,4 @@ const io = new Server(server)
ViteExpress.bind(App, server)
Socket(io)