Skip to content

comfuture/nuxt-fastapi

Repository files navigation

nuxt-fastapi

Webapp template that made with Nuxt and FastAPI backend. Out of box, battery included.

from fastapi import FastAPI

app = FastAPI()

@app.route('/hello')
def hello(name: str = 'World'):
    return {'greet': f'Hello, {name}!'}
<template>
  <div>{{ greet }}</div>
</template>
<script>
export default {
  asyncData({$api, route: {fullPath}}) {
    return $api(fullPath)
  }
}
</script>

Getting started

Getting stared

Pre requirements

  • Python 3.x (with virtualenv)