Git Product home page Git Product logo

cat-collector-api's Introduction

flask-react-jwt-auth

Setup

Clone the template with the command below. Be sure to replace <name-of-your-app-here> in the commands below with the name of your app!

git clone https://github.com/SEI-Remote/flask-react-auth-template <name-of-your-app-here>
cd <name-of-your-app-here>

Once you are in the project directory:

rm -rf .git

Re-initialize a git repository:

git init

Use the GitHub CLI to create a new project repository on GitHub:

gh repo create <name-of-your-app-here>

Getting Started

Create a new virtual environment for your project. The dependencies involved in this configuration of Flask (Flask API) are a bit different, so you’ll want a fresh start with this environment.

conda create -n your_app python=3.9

Next, activate your virtual environment with the command below.

conda activate your_app

Once the environment is active, run the following command in your terminal.

pip3 install -r requirements.txt 

In your terminal, run the following command to create a .env in the base directory of your project.

touch .env

Add an APP_SECRET variable to your .env file.

APP_SECRET=supersecretkey

Next up in the .env, add a DATABASE_URL with the name of our project’s database.

DATABASE_URL='postgresql://localhost:5432/your_database'

Make sure your conda environment is active and hop into the psql shell. Please run the following commands one at a time.

psql
create database your_database;
\q
python3 -m flask db init
python3 -m flask db migrate
python3 -m flask db upgrade

Run the following command to start your application.

python3 app.py

cat-collector-api's People

Contributors

timcrisp94 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.