Skip to content

Saylua-Archive/SayluaLegacy

Repository files navigation

Build Status Coverage Status

Saylua

Run Locally

If you are on Windows, it is heavily suggested you use Vagrant.

Manual

  1. Install Python 2.7

    Note: Ensure you have pip 1.4+ installed with pip --version. If you do not, see: https://pip.pypa.io/en/latest/installing/

  2. Install NodeJS

  3. Install the AppEngine SDK (Make sure you choose to install the original App Engine SDK for Python)

  4. Install MySQL Server

  5. Clone this repo and move to project directory:

    git clone git@bitbucket.org:saylua/saylua.git
    cd saylua
    
  6. Install PIL dependencies zlib and libjpeg.

    Ubuntu users can do the following:

    sudo apt-get install libjpeg8-dev zlib1g-dev
    

    OS X users need only install libjpeg: See: https://dzone.com/articles/installing-libjpeg-os-x

  7. Install python dependencies locally. pip install -r requirements-dev.txt pip install -r requirements.txt -t lib

  8. Install JavaScript dependencies.

    npm install && npm install -g gulp eslint eslint-plugin-inferno mocha webpack

  9. Create the file saylua/config/secure.py based on saylua/config/example_secure.py

  10. Run this project locally from the command line:

    sh run.sh

Vagrant

  1. Ensure you have Vagrant, and VirtualBox installed.

    Note: VMWare Fusion users do not have to install VirtualBox.

  2. Clone this repo and move to project directory:

    git clone git@bitbucket.org:saylua/saylua.git
    cd saylua
    
  3. Install and provision project, SSH into VM:

    vagrant up && vagrant ssh

  4. Run this project locally from the command line:

    cd /vagrant
    sh run.sh
    

Visit the application at http://localhost:8080

See the development server documentation for options when running dev_appserver.

Notes:

  • By default, the dev_appserver.py will track ALL changes to ALL directories, causing startup issues. Making the following change reduces startup time exponentially, and gets rid of filewatcher limit problems.

          ## --> ./saylua/build/google_appengine/google/appengine/tools/devappserver2/watcher_common.py
    
          # Prevent watcher file limit issues.
          _IGNORED_DIRS = ('node_modules', '.git', '.vagrant', 'build', 'lib', 'static/')
    
          def skip_ignored_dirs(dirs):
                """Skip directories that should not be watched."""
    
                _remove_pred(dirs, lambda d: d.startswith(_IGNORED_PREFIX) or d in _IGNORED_DIRS)
    
  • To deploy to production npm run deploy-prod

  • To deploy to staging npm run deploy

Authors

Mike Bradley

Noi Sek

Tiffany Zhang