Skip to content

pace-running/pace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pace

Pace is a registration and management application for running events and competitions.

Build Status Join the chat at https://gitter.im/lplotni/pace Greenkeeper badge

Features

The list of our issues/features can be found on our Trello board.

Demo

You can check out the latest version of the app on our development environemt: http://dev.lauf-gegen-rechts.de:3000/

Development setup

All the parts of pace are Docker containers and can be brought to live by executing the docker-compose up command. Pace will be reachable under http://localhost:3000.

Currently we have following containers:

  • db which provides postgres
  • redis for messaging between pace components
  • pace-pdf for PDF generation
  • pace-app running the express pace app

If you don't have docker on you machine, just follow this instructions for a mac, or this for linux.

Starting

Start all dependencies first: docker-compose -f docker-compose-dev-env.yml up -d Then run npx gulp to start the application and open http://localhost:3000 in your browser.

DB

Pace uses PostgreSQL to store its data. To get postgresql running on your machine during development just start the db container. You can either run this to get the database up:

docker run -p 5432:5432 -d --name 'pace-postgres' -e POSTGRES_PASSWORD='pgtester' -e POSTGRES_DB='pace' -e POSTGRES_USER='pgtester' postgres

or just do npx gulp start-db.

Whenever you start a fresh postgres instance, don't forget to initialize the pace db - just execute npx gulp create-pace-db.

To look at the db in your terminal, just connect to the postgres container via docker exec -it -u postgres pace-postgres psql. If you use other name for the container (e.g. npx gulp start-db will result in one that is randomly generated), adapt the exec command.

REDIS

To decouple our services we use Redis as the message broker. The docker-compose setup will take care of that for you, but if you still want to start it on your own, you need to ensure that it's exposed to the rest of the system. Just run:

docker run -p 6379:6379 redis:latest

Pace-App

Pace-App is currently based on express.js and node, therefore you will need both on your machine.

  • To install node, we recommend to use nvm. Look here for instructions.
  • To get all the other dependencies and be able to start pace locally, just navigate to the pace folder and run: npm install

Pace-Pdf

Service generating our PDFs. Look at pace-pdf

Running tests

For unit tests: npx gulp test

For integration tests: npx gulp test-integration

To execute just a single spec, just pass --single=/path/to/yourSpec.js as additional argument.

For functional tests: npx gulp test-functional

Running jshint

Here you go: npx gulp lint

More info

If you would like to contribute, we have also few blog post explaining our technical choices and setup:

About

Run registration and management application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.0%
  • CSS 5.7%
  • Pug 5.0%
  • Other 0.3%