Personal Blog made with both React and Flask
requirements
- Python 3.*
- Node
- postgresql db (optional)
- Git clone the project
- In the react folder in the terminal run
npm install
to install the node modules - Run
npm start
to serve your react app on a local server - In the flask folder in the terminal run
pip3 install -r requirements.txt
to install python modules - Change the necessary configurations in the .env file
- Run
flask db init
and alsoflask db migrate -m "Initial migration."
to migrate models into db - Run
flask run --host 0.0.0.0
to start the flask server - Copy the url on the terminal for the react app and paste on the browser
According to flask docs: Flask is a lightweight WSGI web application framework. Its easy to use and also learn.
I will be using both flask and Flask-RESTful in this project. There are so many advantages of using both. Just google around and am sure you will find pleanty of articles to explain.
The modules I have incorporated into the flask application include:
- Authentication system-with encryption
- Article/Post application-main application
Cloudinary serves my images.It was easy to setup and use it with my flask application.
Facebook has good documentation on how to start using react. This react app was built from scratch using parcel.
I used both reactstrap and bootstrap4 to style the components. I also incorporated redux as my:
Predictable State Container
Play with the code and have fun.