Skip to content

How to run the project

Romanist edited this page May 8, 2022 · 7 revisions

Back-end and Front-end are two processes running independently from each other and with separate node_modules. We're following JAMstack to deliver best performance possible. Back-end is under back-end folder.

Back-end

  • download and install mongoDB: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/
  • npm install within the server folder
  • run mongodb
  • rename .env-example file to .env
  • go through the variables in .env file, they contain ports you might want to set up. Notice, that you might need to get your own keys for some APIs in order to make them work.
  • set up path to your DB, .env-example contains the default one
  • (optional) import ready-made samples so you DB won't be empty
  • run app.js (node app.js or npm start - nodemon needs to be installed, though)
  • this will launch back-end server on :3000 port by default
  • to make emailing work, acquire Mailgun account and use your sandbox credentials

If there are problems with indexes:

https://docs.mongodb.com/manual/core/2dsphere/

"db.places.createIndex( { loc : "2dsphere" } )" - add 2dsphere

Front-end

SvelteKit is used for Front-end in Measureland.

  • npm install in the root folder
  • npm start

If you didn't change anything, opening http://localhost:8080/ should reveal Measureland running locally. If you want to change ports to your own, you can do it for both front-end and back-end

Clone this wiki locally