This is a skeleton web application using the MongoDB, Flask, backbone.js, bootstrap.js stack. You can use it as a starting point to create your own web app based on this stack.
To create your own application based on this one, first create a new git repository (e.g. on github). Next, clone this repo:
$ git clone https://github.com/elplatt/FlaskBackbone-Skeleton.git MyApp
If you would like to create a repository for your new app, first create an empty git repository. Then change the origin on the cloned repo to the repo for your new app, and push.
$ cd MyApp
$ git remote rm origin
$ git remote add origin https://github.com/myuser/MyApp.git
$ git push -u origin master
This example will push a fresh fork of the repo to myuser
's MyApp
repo.
To install this app, first install the dependencies, and then create a configuration file.
pip install requirements.txt
To configure, copy the sample configuration file and fill it in with your info.
$ cp app.config.sample app.config
The command line tool userconfig
can be used to add, modify, and remove users.
To see usage, just run userconfig
with no arguments:
$ ./userconfig
Usage:
userconfig add <username> <password>
userconfig remove <username>
userconfig password <username> <password>
To add a user named alice
with password topsecret
:
$ ./userconfig add alice topsecret
To change the password for user alice
to bettersecret
:
$ ./userconfig password alice bettersecret
To remove user alice
:
$ ./userconfig remove alice
To run the app locally, just run server.py
:
$ python server.py