Skip to content
The citizens for cities initialive will produce an online platform to help organization and collaboration in urban politics.
Branch: master
Clone or download
dortheimer Merge pull request #129 from meirim-org/subscribe_to_plans
הוספת פונקציונליות מעקב אחרי תוכנית
Latest commit cd27f95 Mar 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
api fixed merge request Mar 6, 2019
bin
config
migrations fixed merge request Mar 6, 2019
public Merge pull request #126 from meirim-org/add_local_authority_credibili… Feb 20, 2019
seeds
test/controller
.editorconfig Implementing front-page Jan 15, 2018
.eslintrc
.gitignore
.nvmrc
.sparkleshare
LICENSE.md
README.md Fixed marketing text Jul 9, 2018
ecosystem.config.js
knexfile.js Added comments Jul 30, 2018
package-lock.json Replace normal fetch from mavat with pupeteer Jun 30, 2018
package.json

README.md

Meirim.org

Codacy Badge

The goal of this project is to empower citizens to effectively organize for their quality of life in their cities and to ensure information about protests is accessible.

Getting Started

The project is in development and has two parts:

Setup instructions for development

Prerequisites for backend

Things you need to install:

  • git
  • Nodejs
  • Mysql

Also these requirements:

https://github.com/nodejs/node-gyp#installation

Instructions for backend

Download code and dependencies

npm install knex -g
git clone git@github.com:dortheimer/CitizensForCities.git
cd CitizensForCities/
npm i

Install chrome dependencies (for ubuntu):

 apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

Import the database schema

mysql -uroot -p

Create a new schema:

CREATE DATABASE meirim character set UTF8 collate utf8_bin;
exit;

Import the sql file

mysql -uroot -p -meirim < backend/doc/import.sql

Run migrations

knex  migrate:latest

Edit the local configuration file and set your database and email settings

vi config/local.json

Run the backend

npm start

Running in production

Run Server in production (using apache to serve public) pm2 start ecosystem.config.js --env production

Set up cron

crontab -e
0 0 * * *  cd /path_to_code/CitizensForCities/ && NODE_ENV='production' /usr/bin/node /path_to_code/CitizensForCities/bin/iplan >> /path_to_code/CitizensForCities/logs/combined.log 2>&1
* * * * *  cd /path_to_code/CitizensForCities/ && NODE_ENV='production' /usr/bin/node /path_to_code/CitizensForCities/bin/send_emails >> /path_to_code/CitizensForCities/logs/combined.log 2>&1

Running in development

node bin/api node bin/dev_server

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details. The rest is licensed under a Creative Commons Attribution 4.0 International License.

You can’t perform that action at this time.