Webapp template that made with Nuxt and Flask backend. Out of box, battery included.
@app.route('/hello')
def hello():
name = request.values.get('name', 'World')
return jsonify(greet=f'Hello, {name}!')
<template>
<div>{{ greet }}</div>
</template>
<script>
export default {
asyncData({app, route:{fullPath}}) {
return app.$api(fullPath)
}
}
</script>
- Python 3.x (with virtualenv)
# install npm dependencies
$ npm install
# install python dependencies
$ poetry install
# serve with hot reload at localhost:3000
$ npm run dev
API Server that made with flask will be launched automacally.
Copyright © 2021 comfuture under MIT License