The following software is necessary to build and run the editor:
- Install Node.js, available
here (this includes the node
package manager
npm
) - Install node-gyp by running
npm install -g node-gyp
on the command line, e.g. cygwin or Windowcmd
- Unix/Mac: this may require the build-essentials tools, which
you can install with
sudo apt-get install build-essential
- Unix/Mac: this may require the build-essentials tools, which
you can install with
- Install browserify by running
npm install -g browserify
- Install grunt-cli by runniing
npm install -g grunt-cli
- Install mongodb, available
here.
- add the
bin
directory to your path (default directory isC:\Program Files\MongoDB\Server\3.4\bin
)
- add the
- Clone the source code repository from
github (e.g. by running
git clone https://github.com/bptlab/gryphon.git
on the command line)- we recommend to create a folder
zoo
and clone intozoo/gryphon
- the following commands assume that you are in the gryphon directory!
- we recommend to create a folder
- Run
npm install
(in the gryphon directory) to set up all additional dependency packages - Run
grunt config
(in the gyphon directory) to copy both config examples and to give them the correct names - Setup MongoDB
- create a data directory, e.g. in
zoo/mongodata
- start database server by running
mongod --dbpath ../mongodata
on the command line (if your data directory is somewhere else, be sure to adapt the path accordingly) - start the mongo client by running
mongo
on the command line - inside the mongo client create a database named gryphondb with
the command
use gryphondb
- if you named your database differently, you need to adapt
the database name in
config.js
by editing the propertyMONGODB_HOST: 'mongodb://localhost/YOUR_DATABASE_NAME
- if you named your database differently, you need to adapt
the database name in
- create a data directory, e.g. in
- Run
grunt
(in the gyphon directory) to build the UI files and to compile all script sources
Once your environment is set up, you can start the editor as follows
- Navigate to the gryphon directory in your command line
- Start the MongoDB server (if it is not already started) by running
mongod --dbpath ../mongodata
on the command line - Run the express server by calling
node bin/www
on the command line - You can now access the editor in your browser at http://localhost:3000/
If you just want to run the editor, instead of modifying it (even though that doesn't really matter, you could also edit it this way, just the building part will take longer), you can run the whole thing in a docker container in 3 easy steps:
- Install Docker.
cd
into the gryphon dir and rundocker build -t bpt/gryphon .
- Run
docker run -it --rm -p 3000:3000 --name gryphon -v gryphon-mongodb-data:/var/lib/mongodb bpt/gryphon
MOST EASY AND CONVENIENT WAY TO RUN GRYPHON
- Install docker & docker-compose
docker-compose up
If running npm install fails:
Check wether you have installed all build-essentials (Otherwise run: sudo apt-get install build-essential
)
Run: sudo npm install -g node-gyp
Try again.
When running on Windows, make sure to have the following additional dependencies installed:
- Python 2.7 (Python >= 3 won't work!)
- Any version of Visual Studio (use the --msvs_version=20XY switch for Visual Studio 20XY)