Skip to content

rlnx/japronto-vue-spa

Repository files navigation

Vue.js SPA & Japronto REST server example*

SPA — single page web application
REST — representative state transfer

From the one hand example demonstrates how to make REST server on the basis of Japronto and Python 3.5+ asyncio. From the other hand it can be considered as starting point for learning Vue.js extended with Vuex and many other front-end stuff like CoffeeScript, Webpack and Pug.

test-runner-home

test-runner-suites

Getting started

Make sure the following software is installed and is in the PATH.

Checkout repository and run following commands inside the repo root. It will install all necessary front-end and back-end dependencies.

pip install -r requirements.txt
npm install

Then build front-end by running

npm run build

Before running Japronto server, first start MongoDB server as follows or change DB connection string in server/config.py if you have existing MongoDB instance.

npm run mongo

To start Japronto server execute

npm run dev  # debug environment
npm run prod # production environment

by default it will start HTTP server at localhost:5432