git clone https://github.com/crowdgames/cartoscope-backend.git
Install Node, MySQL and Wget:
- Windows users follow the link to install Node: http://blog.teamtreehouse.com/install-node-js-npm-windows
- When installing MySQL server, make sure the lower_case_table_names is set to 2 and that passwords use Legacy Authentication Method is selected
- Make sure wget is in your path.
OSX users need to follow the given steps:
- Install brew.
- brew install node
- Install nginx using brew.
- brew install mysql
- Install wget using homebrew: http://stackoverflow.com/questions/33886917/how-to-install-wget-in-macos-capitan-sierra
Debian / Ubuntu
sudo apt install nodejs mysql-server wget
Start mysql: mysql.server start (On Ubuntu:
sudo service mysql startor
sudo systemctl mysql start)
Open mysql console using
sudo mysql(if root user is created, you may need to do
sudo mysql -u root -p)
Run the following sql commands on the mysql shell
CREATE USER 'converge'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'converge'@'localhost'; CREATE DATABASE convergeDB;
Run the following command to reset the password of any user (if required).
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPassword';
Create the necessary mysql database. In the cartoscope backend directory:
mysql -u converge -p convergeDB < database_migrations/dump.sql
Create directories. In the cartoscope backend directory:
mkdir temp mkdir dataset
Cartoscope requires SSL certificates for running on HTTPS. Run this command: Setup SSL Certificates:
openssl req \ -newkey rsa:2048 -nodes -keyout domain.key \ -x509 -days 365 -out domain.crt
For more information, follow this link: https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs
Set environment variables in bashrc (replace with your values. For a test / personal use, consider 8081, 8082 as the PORTS)
export CARTO_DB_USER=converge export CARTO_DB_PASSWORD=password export CARTO_DB_NAME=convergeDB export CARTO_MAILERfirstname.lastname@example.org' export CARTO_SALT='$$$$$$$$$$$$$$$$$$$$$$' export CARTO_PORT=80 export CARTO_PORT_SSL=443 export CARTO_SSL_KEY='path/to/your/certificate.key' export CARTO_SSL_CRT='path/to/your/certificate.crt'
Python related installations:
Make sure pip is installed and then intall PIL sudo easy_install pip Sudo pip install pillow
Install required npm modules for backend and frontend:
cd cartoscope-backend npm install -g bower npm install cd ./public bower install
To facilitate development, also install nodemon with
npm install -g nodemon
cd ../cartoscope-backend nodemon app
Setup Users etc.
- Your main page is at http://localhost:CARTO_PORT (where CARTO_PORT is the port specified in the environment variables)
- For the remainder of the instructions, we will use port 8081 as the selected port:
- In order to start setting up projects, you will need to register a user by going to http://localhost:8081/#/login
- Make sure your registered user's name is
cartoprojectfor project creation privileges to apply.
- Login with the user and create a project
- Caution The current setup does not provide a graphical interface for creating project tutorials. This can be accomplished by adding the image files to the
cartoscope_backend/public/images/Tutorials/folder and adding the relevant information to the