Example for a authentication workflow based on Morepath and Cerebral
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
client
deploy
docs
requirements
server
static
.cz-config.js
.eslintignore
.eslintrc.json
.gitattributes
.gitignore
.prettierignore
.prettierrc.json
.travis.yml
CHANGES.md
LICENSE
Makefile
README.md
mkdocs.yml
package-lock.json
package.json
setup.cfg
setup.py
tox.ini
webpack.config.js

README.md

Boilerplate for an authentication workflow

Detailed documentation you can find at http://auth-boilerplate.readthedocs.io.

tl;dr

Morepath REST server

From inside the project directory create a clean Python environment with virtualenv and activate it:

virtualenv -p python3 env
source env/bin/activate

After this you can install the package including dependencies using:

(env) $ pip install -Ue .

Once that is done you can start the server:

(env) $ gunicorn server.run

You can go to http://localhost:8000 to see the UI.

Cerebral React client

JavaScript code is in the client subdirectory. To rebuild the bundle you need to install the JS dependencies (listed in package.json). Run:

npm install

to install them. Then run:

npm run build

To rebuild the bundle after changing it.

If you want to rebuild the bundle and immediately after start the server you can use:

npm start

Development

If you want to create a pull request, this is the workflow:

  • Fork the repository on GitHub and clone it.
  • Checkout a new branch.
    git checkout -b patch-1
  • Make the changes you want.
  • Add them to git.
    git add .
  • For making commits use the following cli which will guide you. Javascript code will be auto-formatted with prettier during commit.
    npm run commit
  • Push the changes.
    git push --set-upstream origin patch-1
  • Create the pull request on GitHub.