See mozilla/webmaker.org for all the changes required to get it working with Webmaker.
Importing Events to Fixtures
Events can be loaded at runtime by placing a JSON file with the Event fixture
at fixtures/initial_data.json. This can be generated from the live webmaker
events by running:
To fill the city/country fields for Events, you can run the following script:
foreman run ./node_packages/webmaker-events/scripts/geocode_events.js
To convert the attendee field from the old enum/range format to an average number (this should only be run once):
foreman run ./node_packages/webmaker-events/scripts/convert_attendees.js
You can run a basic nodeJs repl with the orm loaded via the ‘db_shell.js’ script:
foreman run ./node_packages/webmaker-events/scripts/db_shell.js
Known Bugs
DateTime fields seem to not work with fixtures loaded into SQLite, when
the fixtures where generated from data dumped from a webmaker.org server
running mysql (default).
webmaker-events
Pluggable events app for Mozilla Webmaker
NOTE: Webmaker has moved to a new Events platform.
New Repo: http://github.com/mozilla/webmaker-events-2
Integrating into Webmaker
Add the following line to
app.js:where:
appis the Express appnunjucksEnvis the nunjucks Environment for adding a custom fileloader before callingnunjucksEnv.express(app)lessMiddleWareis the ‘less-middleware’ module, for compiling less stylesheetsapp_rootis the root dir for the express app, which is usually__dirnameAdd
webmaker-eventsto the dependency list inpackage.json:See mozilla/webmaker.org for all the changes required to get it working with Webmaker.
Importing Events to Fixtures
Events can be loaded at runtime by placing a JSON file with the Event fixture at
fixtures/initial_data.json. This can be generated from the live webmaker events by running:This requires several Perl and several CPAN packages, which can be installed via cpanminus:
Running Database Migrations
Database migrations must be run from within the webmaker.org dir using foreman:
To undo the latest migrations:
If you don’t have foreman, you can also try:
To fill the city/country fields for Events, you can run the following script:
To convert the attendee field from the old enum/range format to an average number (this should only be run once):
You can run a basic nodeJs repl with the orm loaded via the ‘db_shell.js’ script:
Known Bugs