项目作者: hack4impact-mcgill
项目描述 :
Open-air museum map for MU MTL's 15th anniversary
高级语言: TypeScript
项目地址: git://github.com/hack4impact-mcgill/mu-map.git
MU MTL Open-air Museum Map


For MU MTL‘s 15th anniversary 🎉
A progressive web app for Montrealers and visitors to explore murals.

Team
🎹 Developers
🎨 UI/UX Designers
🎤 Project Managers
Backend
🏗️ Setup
- Ensure you have npm and Docker installed.
- Run
npm install inside the backend folder. - Run
docker pull kartoza/postgis:latest to pull a ready-to-go PostgreSQL image with PostGIS. - Run
docker run --rm --name my_postgis -P -p 5301:5432 kartoza/postgis to start the container. - Create a file called .env in the backend root and copy the contents of .sample-env in it. NOTE: if you are running the (deprecated) Docker
Toolbox instead of Docker Desktop, type docker-machine ip into your command line, and paste the output into your DB_HOST .env variable. - You can remove the old database image and container to free up space on your machine.
🏃 Running
- Make sure docker is running and the Postgres container exists (which was created in the previous section).
- Run
npm start. You should see some output about the database tables being created. You are ready to work with the API. - Run
npm run start-migrate to populate the DB with some sample data. - Run
npm t to run unit tests. Unit tests should pass.
Frontend
cd into frontend- Add a file called .env with the appropriate keys from Slack. See .sample-env for reference.
yarn install dependencies (yarn is the same as npm but fahttps://www.sitepoint.com/yarn-vs-npm/r)yarn start and open the browser to localhost:3000 or go to 192.168.2.20:3000 on your phone on wifi! 📱- To debug, open Developer Tools in Chrome or Firefox via right click > inspect or
cmd/ctrl+shift+c.
Deployment
🚀 The client-side and server code both deploy automatically when a PR is merged into main.
- The frontend is deployed and hosted by Vercel.
- The backend is deployed via our CD script, which generates a build, zip)s it, then deploys the artifact to our AWS Elastic Beanstalk (EB). The backend runs on an AWS Elastic Cloud Compute (EC2) instance (which is just a Linux VM). That EC2 is wrapped by an AWS Elastic Load Balancer (ELB) to receive and downgrade incoming HTTPS traffic to HTTP. The ELB’s IP address is stored as the A record of api.mumap.xyz in Vercel.
