Giter Site home page Giter Site logo

fastapi-backend's Introduction

FastAPI

Description

REST API for processing data from external REST API (Flexibee) and forwards them processed further to frontend and backend app

Get code

For get this code from repository to your local pc you can use this steps:

Fork this repository to your Github account or clone this repository to local PC.

git clone https://github.com/BMWdejf/FastAPI-backend.git

Open folder with code in IDE (PyCharm or VSC)

Open terminal window and run this commands:

python -m venv venv

or

python3 -m venv venv

Activate Venv

for user which you have MacOs or Linux next step is

source venv/bin/activate

for user which you have Windows

.\venv\Scripts\activate

You must see "(venv)" in leftside your terminal

Install packages from requirements

For next step it is important install packages from requirements.txt

pip install -r requirements.txt

after finishing will be testing runing code on localhost server

hypercorn app.core.main:app --reload

if all work correctly open link in your browser

127.0.0.1:8000

you must get

{"message":"FastAPI works!"}

Deploy on Railway

if the first tine deploying on Railway.app you need install Railway CLI to your PC.

For more informations following this link Installing the Railway CLI

Homebrew (macOS)

In a Terminal, enter the following command:

brew install railway

or npm for Windows

npm i -g @railway/cli

if you want to know what commands you can use, enter the following commnad in terminal

railway --help

the first step is to log in to your Railway account

railway login

follow the instructions until successful login.

now you must create a new project

railway init -n fastapi-backend-3

now is last step for deploying your first app to Railway.app

railway up

in terminal you must see:

[2024-05-17 18:12:48 +0000] [12] [INFO] Running on http://[::]:7186 (CTRL + C to quit)

Now is really the last step. You must generate your public URL address in your app. Click on your app in Railway dashboard, go to section "Settings" now find section "Networking" and click on the button "Generate domain". After few times you open the generated link in your browser.

fastapi-backend's People

Contributors

bmwdejf avatar redmonkez12 avatar

Watchers

 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.