Giter Site home page Giter Site logo

angular-fastapi's Introduction

Angular FastAPI

This is a cookie cutter template created from https://github.com/bubthegreat/cookiecutter-angular-fastapi for an angular frontend and a FastAPI backend! Basic instructions are below for running your dev locally to get up and running! Examples for services and API calls are still in progress!

Angular Frontend

Our frontend is Angular, reachable at http://localhost:4200 when the test server is up - but deployments to production are beyond the scope of this cookiecutter template.

Installing the frontend

PS C:\Users\bubth\Development\test> cd .\angular-fastapi\app-angular-fastapi\ 
PS C:\Users\bubth\Development\test\angular-fastapi\app-angular-fastapi\> npm install . 

Running the frontend

To run the frontend, you'll run the command:

ng serve

from the frontend directory. If you navigate to http://localhost:4200 you should see a generic welcome page!

FastAPI Backend

Our API backend is FastAPI, which does automatic swagger docs for you! Swagger docs will be available at http://localhost:8000/docs when running on your localhost so you can see what they look like.

Installing the backend

(venv) PS C:\Users\bubth\Development\test\> cd .\angular-fastapi\api_angular_fastapi\ 
(venv) PS C:\Users\bubth\Development\test\angular-fastapi\api_angular_fastapi> python -m venv venv
(venv) PS C:\Users\bubth\Development\test\angular-fastapi\api_angular_fastapi> .\venv\Scripts\Activate.ps1
(venv) PS C:\Users\bubth\Development\test\angular-fastapi\api_angular_fastapi> pip install .
Processing c:\users\bubth\development\test\angular-fastapi\api_angular_fastapi

    *** SNIP INSTALLATION ***

(venv) PS C:\Users\bubth\Development\test\angular-fastapi\api_angular_fastapi>

Running the backend

To run the backend API, you should be able to run the app.py:

(venv) PS C:\Users\bubth\Development\test\angular-fastapi\api_angular_fastapi> python .\test1_backend\app.py
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO: Started reloader process [11436]
INFO: Started server process [2248]
INFO: Waiting for application startup.

If you navigate to http://localhost:8000/status you should get something similar to this:

{"status":"UP","uptime":"52s","server_time":"2019-10-05 23:27:54.505806"}

angular-fastapi's People

Contributors

bubthegreat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.