Giter Club home page Giter Club logo

hello_flask_ng's Introduction

hello-flask-ng

Flask and AngularJS Starter App

With just a few steps you can get an app with a Flask server and AngularJS frontend. There are also unit tests so you can get a flavor of those as well.

Install (python)

This assumes you have Python 2.7.x installed and are working on Linux or OS X.

Install the virtualenv script

pip install virtualenv

so you can create a new Python virtual environment using the venv/ directory to store all the environment's packages, executables, and metadata

virtualenv -p /usr/bin/python2.7 venv

Once we've instantiated our virtualenv in the directory venv/, we can activate the still-unactivated virtual environment.

. venv/bin/activate

Now when we install new modules with the virtualenv activated, the will be installed under venv/. virtualenv has done the hard work of setting up system PATHS for you so when you run ipython, for example, it will be actually running venv/bin/ipython. We can install all the requirements using the following command. As you might guess, the Python requirements are stored in requirements.txt.

pip install -r requirements.txt

You also need MongoDB installed. To do this you need to have homebrew installed installed. Run

brew install mongodb

then follow the instructions brew gives you to finish the installation and start your MongoDB server.

Install (javascript)

You need to have NodeJS installed, the server-side javascript. On OS X

brew install node

This will also install the Node Package Manager npm, which we'll use to install some dependencies. First you need to install bower:

npm install -g bower

Then install nodejs dependencies, used for testing on user's machine.

npm install

Now use bower to install the client-side dependencies.

bower install

Run development servers and/or tests

The startup.py script takes one argument, one of the following:

  • pyTest: run python unit tests using the command nosetests -v
  • e2e: run end-to-end tests by starting a front and backend server and running Protractor tests that automate in-browser testing
  • ngSpec: Run controller, service, and other Angular component specifications
  • testAll: Run all tests described above
  • run: Run the front and backend servers for demoing using a persistent database

for example

./startup.py pyTest

hello_flask_ng's People

Contributors

mt-digital avatar

Stargazers

 avatar

Watchers

 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.