0
Follow
2
View

Problem with repl server shutdown

cuixiao8765 注册会员
2023-02-25 14:13

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > Repl. It is an online platform for the development, the free version is to use time limit. If you want to keep your program running, consider the following methods:

  1. Use other cloud providers. You can use free plans offered by Cloud providers like AWS, Google Cloud Platform, or Microsoft Azure. These packages often include limited computing resources and storage space, but they can keep your applications running for a long time.

  2. Use platforms such as Heroku or Glitch. These platforms provide free virtual machines and servers to keep your applications running. Flask applications are also supported on these platforms.

  3. Run the application on your own server. You can purchase a virtual private server(VPS) or cloud server and then install a Flask application on the server. This requires some technical knowledge and the ability to maintain the server.

Note that you may have to deal with some limitations and instability when using free services. Therefore, if you need better performance and stability, it is best to consider purchasing a paid service.

cuixingwei05 注册会员
2023-02-25 14:13

Part of the answer references GPT, GPT_Pro better solve the problem


Keeping the repl server running is generally a matter of finding a server that provides a persistent environment, rather than one that only provides short runs. If you don't want to pay, you can use a free cloud server. Heroku, for example, offers free dyno(that is, the runtime environment), and its dyno can always be turned on(except for periodic restarts).

The steps are as follows:

  1. Register an account on Heroku's official website.
  2. Install the Heroku CLI tool. Type 'heroku login' in the command line interface and enter the user name and password to login.
  3. Use Git to upload your code to GitHub and then connect to GitHub via the Heroku CLI.
  4. Create an app on Heroku that connects to the code base on GitHub.
  5. Configure the application environment.
  6. Configures the command line of the server.
  7. Start the server with the command 'heroku ps:scale web=1'.
// 代码示例:
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello():
    return "Hello World!"
    
if __name__ == '__main__':
    app.run()

That's how you implement a way to keep the server running on the repl. I hope I can help you.
If the answer is helpful, please accept it.

gnlchenyiran 注册会员
2023-02-25 14:13
< div class = "md_content_show e397 data - v - 3967" = "" >

but he always says: We could not verify you are not a robot. Please try the CAPTCHA again. What if I cannot register?

About the Author

Question Info

Publish Time
2023-02-25 14:13
Update Time
2023-02-25 14:13

Related Question