Git Product home page Git Product logo

lrs's Introduction

#Deployment

##Before deployment

  1. Install nodejs v0.11.xx
  2. Install iisnode for IIS 7.x/8.x: x86 or x64
  3. Install URL Rewrite for IIS
  4. Install Mongo DB 2.6.7 (or latest)

##Deployment

Configuring database

  1. Run Mongo DB as win service

  2. Create "statements" and "results" collection within "lrs" DB.

    use lrs
    db.createCollection("statements"); 
    db.createCollection("results"); 
    
  3. Create indexes for most frequently used filter properties:

    use lrs
    db.statements.ensureIndex({ "context.extensions.http://easygenerator/expapi/course/id" : 1});
    db.statements.ensureIndex({ "context.extensions.http://easygenerator/expapi/learningpath/id" : 1});
    db.statements.ensureIndex({ "verb.id" : 1});
    db.statements.ensureIndex({ "context.registration" : 1});
    
    db.results.ensureIndex({ "id" : 1, "last_activity": -1 });
    db.results.ensureIndex({ "attempt_id" : 1 });
    

Installing website

  1. Clone this Git repository locally

  2. Run npm install in the root

  3. Create web.config file in the root to register iisnode module as a handler for our app.js file and to configure URL rewriting module:

    <configuration>
      <system.webServer>
        <handlers>
          <add name="iisnode" path="app.js" verb="*" modules="iisnode" />
        </handlers>
        <rewrite>
          <rules>
            <rule name="lrsApp">
              <match url="/*" />
              <action type="Rewrite" url="app.js" />
            </rule>
          </rules>
        </rewrite>
        <defaultDocument enabled="true">
          <files>
            <add value="app.js" />
          </files>
        </defaultDocument>
        <httpErrors existingResponse="PassThrough"></httpErrors>
      </system.webServer>
      <appSettings>
        <add key="IP" value="127.0.0.1" />
        <add key="PORT" value="80" />
      </appSettings>
    </configuration>
    
  4. Create 'iisnode.yml' file in the root to override default node run options and to specify --harmony flag

    nodeProcessCommandLine: node.exe --harmony #full path can be used here as well

  5. Copy folder to the server (without .git and package.json:))

  6. Create Web site in IIS and add corresponding site bindings and permissions

  7. To generate results into results collection from existing data in statements collection install "co" module via npm and run:

    node migration/exec.js

Resources

  1. Hosting node.js applications in IIS on Windows
  2. Getting started with Mongo DB

lrs's People

Contributors

romsters avatar vasyl-ivanchuk avatar andriidrebot avatar yuliasavchuk avatar

Watchers

Dmytro Ostapenko avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.