| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
LaTeX to online interactive materials.
To set up a server on arch, one can as root
pacman -S nodejs npm git mongodb nginx redis systemctl enable mongodb systemctl start mongodb systemctl enable nginx systemctl start nginx systemctl enable redis systemctl start redis
and then as a regular user
git clone https://github.com/XimeraProject/server.git cd server npm install
To quickly set up a server using Ubuntu Linux 16.04 LTS (which is availble on AWS and a t2.small is sufficient), you can:
sudo apt-get install nginx mongodb libcurl4-gnutls-dev libgit2-dev curl -sL https://deb.nodesource.com/setup_7.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt-get install nodejs sudo ln /usr/bin/nodejs /usr/bin/node git clone https://github.com/XimeraProject/server.git cd server npm install BUILD_ONLY=true npm install nodegit
If you want to install it on Windows, set 'Setting up a server on Windows' below.
Install g++, nodejs and mongodb on your computer (under Debian, may also need nodejs-legacy package)
Run an instance of mongo server:
mongod --dbpath <insert-your-path>
You may have to make the path. For example,
mkdir -p /tmp/data/db
mongod --dbpath /tmp/data/db
Fetch and unpack the sample database Unpack the tarball:
tar xfzv database.tar.gz
This creates a directory containing BSON and JSON files
Import the database into mongo:
mongorestore <path-to-db-directory-with-BSON-files>
Clone the repository:
git clone https://github.com/kisonecat/ximera
Create file .env with content:
XIMERA_MONGO_URL=127.0.0.1 XIMERA_MONGO_DATABASE=test XIMERA_COOKIE_SECRET=thisismysecretcookieyoushouldchangethis COURSERA_CONSUMER_KEY=thisisacourserakey COURSERA_CONSUMER_SECRET=courserasecretkey LTI_KEY=myltikey LTI_SECRET=myltisecret GITHUB_WEBHOOK_SECRET=githubwebhooksecret
This file will be loaded by the dotenv package.
Note that if you used a different database name, you should set XIMERA_MONGO_DATABASE to the name of your database.
Go into the ximera directory within the kisonecat repository and use npm to install all other js scripts needed by the server
cd <path-to-ximera> npm install (you may be required to answer a prompt or two) openssl genrsa -out private_key.pem 2048
If you are having trouble installing the canvas package and are on a Debian-based distribution, you can try sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev
You should run gulp with the following commands
node ./node_modules/bower/bin/bower install
npm install
cd ../..
mkdir -p components/syntaxhighlighter/amd
node node_modules/requirejs/bin/r.js -convert components/syntaxhighlighter/scripts components/syntaxhighlighter/amd
Run the ximera server apps.js using:
node app.js
View the ximera server in your web browser at localhost:3000
Before we get started, I must inform that I implemented a portable version of the server. You may need to make minor variations to the environment variables if you install it formally (meaning into the Windows registry).
Download the necessary programs.
Clone the ximera server repository by running git clone https://github.com/kisonecat/ximera in the command prompt in your working directory. An easy way to get to the command prompt from the windows file explorer is to hold down Shift and right click on the folder and select 'Open command window here'.
Make a batchfile with the following lines.
:: change to wherever node.exe resides. Use %~dp0 for the path of the location of this batch file. SET NodejsPath=%~dp0 :: change to whereever npm.cmd resides. SET NPMPath=%~dp0 :: This is the folder where the mongod.exe file lives, within the mongdb directory. %~dp0 heads it off because it is a subfolder of %~dp0. SET MongoDBPath=%~dp0mongodb-win32-x86_64-2008plus-2.6.3\bin :: Implement these into the system path, for this session. SET Path=%path%%NodejsPath%;%NPMPath%;%MongoDBPath% SET XIMERA_MONGO_URL=127.0.0.1 SET XIMERA_MONGO_DATABASE=test SET XIMERA_COOKIE_SECRET=thisismysecretcookieyoushouldchangethis SET COURSERA_CONSUMER_KEY=thisisacourserakey SET COURSERA_CONSUMER_SECRET=courserasecretkey SET LTI_KEY=myltikey SET LTI_SECRET=myltisecret SET GITHUB_WEBHOOK_SECRET=githubwebhooksecret
Open the command window and run the following commands
Without closing that command window, open another one
Open the browser and type in localhost:3000 into the command line and you should get this:
The css files are missing (if you noticed, after you opened your browser, in the command window you got the error LESS file error : 'bootstrap.less' wasn't found )
| Back | FazBrowse Home | New Git URL |