Coder Social home page Coder Social logo

flask-restful-example's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flask-restful-example's Issues

[ Discussion ] Deployment using Gunicorn

Hi! I was trying to find good flask structures and found your repository.
I read an articles saying that Flask structures mostly are divided into 2 types: divides based on the modules, or single module.

and I see that your structures is using single module one (by making lot of files in resources folder.
so I tried to combine your structures with other structures that separated each modules.

I just started using Flask in late 2019, but I never used the proper or object-oriented-like structures like you did. It's amazing for me to be able to write such a good structures, it thanks to you!

But sure after done with the structures, I have to jump to the next stage, deployment.
Been following some articles about deployment, and trying it out, and I wasn't able to run my app properly.

I have some questions: To run the Flask on development environment (locally), do you use syntax below right?

python3 manager.py debug or python3 manager.py run

yes, it's successfully executed on my local too, but it's not giving the same result on my DigitalOcean's server. It has an error, especially on 'from abc import ABC'. so I deleted that line and the args on StandaloneApplication too. is it something that I shouldn't delete?

some articles keep saying to run on server we should do 'gunicorn app:app' but it's not working since app will run create_app(config) that needs config module as args. in the end of the day, I found out that to run on server using gunicorn, I should use 'gunicorn manager:app' and it's successfully executed and running well when I tried to visit on my local browser.

I mean, even it gives me a success, but I don't understand why I should write ':app' there to run the app. I can accept that we should write 'manager' as the .py file that calling our main Flask app. but 'app' itself. Running 'python3 manager.py run' on my local, it will create a new sqlite db for me when I add 'db.create_all()' inside create_app(). but calling 'gunicorn manager:app' doesn't creating a new sqlite db on my server. should I call the db init migrate and etc on server to create one?

I'm sorry if it is too long, I just don't understand anything at all. Thanks a lot for the examples and your time reading my questions!

References I used:
Kickstarting Flask on Ubuntu – Setup and Deployment
Deploy flask app with Nginx using Gunicorn

设计理念

可以在readme里书写一下基本的设计**吗?或者写在简书里,然后配个链接也行。

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.