ethermap/backend
2023-09-14 13:39:47 +02:00
..
controllers modified to have only one set of scripts for install, migration and dev env 2023-09-14 13:39:47 +02:00
db changed dev and testing environments to sqlite3 2023-09-14 12:50:31 +02:00
middleware added frontend files and folders to git 2023-09-13 16:59:17 +02:00
routes added frontend files and folders to git 2023-09-13 16:59:17 +02:00
tests added frontend files and folders to git 2023-09-13 16:59:17 +02:00
.env.template modified to have only one set of scripts for install, migration and dev env 2023-09-14 13:39:47 +02:00
express.js added frontend files and folders to git 2023-09-13 16:59:17 +02:00
index.js added frontend files and folders to git 2023-09-13 16:59:17 +02:00
knexfile.js modified to have only one set of scripts for install, migration and dev env 2023-09-14 13:39:47 +02:00
package-lock.json modified to have only one set of scripts for install, migration and dev env 2023-09-14 13:39:47 +02:00
package.json modified to have only one set of scripts for install, migration and dev env 2023-09-14 13:39:47 +02:00
README.md added frontend files and folders to git 2023-09-13 16:59:17 +02:00
sockets.js added frontend files and folders to git 2023-09-13 16:59:17 +02:00

ethermap api

Backend for ethermap

Install

To install and run the backen you will need NodeJS and npm installed, along with access to Postgresql server (possibility for this to be any database server). Then :

$ npm i

Once all the packages are installed you should setup your .env file (follow the .env.template). Once this has all the appropriate entries you can then connect and migrate the database.

$ npm run migrate:latest

then to run the development server you should run :

$ npm run dev

Tech

The backend is made up of a REST api and websocket server. The REST api is built on Express and the websocket server is built on socket.io.

Database interface is the ODM objection.js. This setup might not be the best as it was adopted mid-project after starting with just Knex alone.

Tests are written in Ava.