Go to file
Lucas Verney ad6cc13681 Add some doc 2018-06-26 15:36:45 +02:00
build Initial commit 2018-06-25 18:29:57 +02:00
config Add some doc 2018-06-26 15:36:45 +02:00
server Add some doc 2018-06-26 15:36:45 +02:00
src Add some doc 2018-06-26 15:36:45 +02:00
static Initial commit 2018-06-25 18:29:57 +02:00
.babelrc Initial commit 2018-06-25 18:29:57 +02:00
.editorconfig Display reports on the map 2018-06-26 11:04:23 +02:00
.eslintignore Initial commit 2018-06-25 18:29:57 +02:00
.eslintrc.js Initial commit 2018-06-25 18:29:57 +02:00
.gitignore Initial commit 2018-06-25 18:29:57 +02:00
.postcssrc.js Initial commit 2018-06-25 18:29:57 +02:00
LICENSE.md Add some doc 2018-06-26 15:36:45 +02:00
README.md Add some doc 2018-06-26 15:36:45 +02:00
index.html Display reports on the map 2018-06-26 11:04:23 +02:00
package.json Show the reports as soon as they are added in the db 2018-06-26 11:39:43 +02:00
requirements.txt Initial commit 2018-06-25 18:29:57 +02:00
yarn.lock Show the reports as soon as they are added in the db 2018-06-26 11:39:43 +02:00

README.md

Cyclassist

Track and share issues (work, interruption in routes, parked cars) in realtime on bike lanes!

This app is made of two parts: a client webapp and a server part to store and serve the issues.

Client part

Build setup

# Install JS dependencies
yarn install

# Serve with hot reload at localhost:8080
yarn dev

# Build for production with minification
yarn build

# Build for production and view the bundle analyzer report
yarn build --report

Useful environment variables

You can pass a few environment variables to the yarn build|dev commands to adapt the behavior to your needs.

  • PUBLIC_PATH=https://.../foobar to serve the app from a subdirectory.
  • API_BASE_URL=https://... to specify the location of the server (defaults to /). The value should end with a trailing slash.

Server part

Build setup

# Install Python dependencies
pip install -r requirements.txt

# Start the server
python -m server

It is better to use a dedicated virtualenv if you can :)

Useful environment variables

You can pass a few environment variables to the python -m server command to adapt its behavior:

  • HOST= to specify the host to listen to (defaults to 127.0.0.1 which means localhost only).
  • PORT= to specify the port to listen on (defaults to 8081).

Contributing

The quickest way to get started is to simply run

API_BASE_URL=http://127.0.0.1:8081/ yarn dev

to spawn the client-side webapp, listening on localhost:8080 and

python -m server

to spawn the server-side part, listening on localhost:8081.

License

This software is licensed under an MIT license, unless explicitly mentionned otherwise.