This is a hackathon PoC of an app that aims to keep movements alive and visible in times of lockdown. Users will be able to see a map of demonstrations for causes in their communities or around that world. Supporters will be able to register their heartbeat and help movements grow.
-
Install MongoDB GoDriver
go get go.mongodb.org/mongo-driver
- Install Gorilla Mux
go get -u github.com/gorilla/mux
- Install Gorilla WebSocket
go get github.com/gorilla/websocket
- Install dependencies
cd ./client && npm install
Start MongoDB locally and run:
cd ./server && go run main.go
Or pass a MongoDB URI to the server
cd ./server && go run main.go --db=<DB_URI>
Go to http://localhost:8080 in your browser.
cd ./client && npm start
GET
All Movements
curl -v http://localhost:8080/api/movements
Example Response:
[
{
"_id":"5e92d073035fc120f86d6462",
"latitude":51.5074,
"longitude":0.1278,
"numberofparticipants":10,
"summary":"testMovement summary",
"title":"testMovement"
},
]
POST
Create Movement
curl -X POST -v http://127.0.0.1:8080/api/movements \
-d '{"title": "TestMovement","summary": "Power to the people.","latitude": 51.5074,"longitude": 0.1278}'
PATCH
Vote for Movement
curl -X PATCH -v http://localhost:8080/api/movements/<id>/vote