Git Product home page Git Product logo

preapp's Introduction

preapp

At Preblur, we heavily use Flask applications.

This is our template.

Conventions

- Always break out code that does different things into a different file
- 4 space tab
- Wrap code to 80 characters; plaintext and comments to 78

Environment Requirements

- UNIX-ish
- Python 2.7.5
- Macs:
    - Homebrew
    - `sudo easy_install pip`
    - `sudo pip install virtualenv`
    - `brew install postgres`
    - `brew install redis`
    - `brew install heroku-toolbelt`

Setup

After cloning the project, create a new file .env in the root directory. This will be used to store all client secrets.

Here is a sample .env which contains all the neccessary keys:

DEBUG=true
REDIS_URL="redis://localhost:6379/0"
REDIS_MAX_CONNECTIONS=10
POSTGRES_URI=postgresql://root@localhost/app

Scripts

At the beginning of every development session--and after pulling from the repo--run:

$ script/init_env.sh

If you've made any changes to the environment (mostly script/run pip install <pkg>) make sure to save them before committing changes:

$ script/save_env.sh

To run commands, instead of $ cmd arg1 arg2, use:

$ script/run cmd arg1 arg2

To start the server in development mode, use:

$ script/launch

To start the server under gunicorn (Heroku mode), use:

$ script/hlaunch

preapp's People

Contributors

yodaiken avatar

Watchers

James Cloos 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.