Replit, formerly Repl.it, is a San Francisco-based start-up and an online integrated development environment. Replit being Software as a service allows users to create online projects and write code in many supported languages.
Repls typically go to sleep after a period of inactivity (30 minutes after your website is visited). To make sure that your Repl is restarted, you can use our Always On functionality.
To add Always On to your Repls, you will need to purchase Cycles or by subscribe to their plan.
https://docs.replit.com/
Registration for Free Plan
Free Personal Plan:
Free for all you need to get started.
FEATURES
- Unlimited Repls
- Free storage - 500 MB
- Memory - 500 MB
- vCPUs - 0.2 - 0.5
- Live multiplayer collaboration
LIMITATIONS
- Your repl will sleep after about 30 minutes of inactivity,
SOLUTION
- T keep it awake, simply host a web server and ping it with site such as https://uptimerobot.com/
REGISTRATION
- URL: https://replit.com/
https://docs.replit.com/
Create Your First Repl
Lets start with htop software. It will automatically install it then run it.
~/test$ htop
htop: command not installed, but was located via Nix.
Would you like to run htop from Nix and add it to your replit.nix file? [Yn]: Y
Adding htop to replit.nix
success
/nix/store/zkjmh1llrq0ssamd5lfxyz43s09vafhr-htop-3.0.5
Detected change in environment, reloading shell...
~/test$
Steps to create your first Python App
Document Website: https://docs.replit.com/
https://replit.com/
Homepage: https://replit.com/
1 Log into replit site.
2 From Home page, click +Create button to create your own Repl. Choose Python as templete.
3 Type following code into main.py code section
from replit import web
import flask
from flask import Flask, request
app = flask.Flask(__name__)
@app.route("/")
def home_view():
ip_addr1 = request.remote_addr
ip_addr2 = request.environ['REMOTE_ADDR']
ip_addr3 = request.environ.get('HTTP_X_FORWARDED_FOR', request.remote_addr)
return "</BR>" +"</BR>" +"</BR>" +"<h1>Welcome to My PY website!</h1>"+"</BR>" + "<h1> Your IP address is:" + ip_addr1 +"</BR>" + "<h1> Your IP address is:" + ip_addr2 + "</BR>" + "<h1> Your IP address is:" + ip_addr3
web.run(app)
4 Click green Run button to start to run it
You will get a url from right panel Webview:
Using UptimeRobot Site to Keep it Awake
If you Repl website is not visited in 30 minutes, it will be put into sleep mode. then you will have to go to home page again to wake it up.
Here is a simple way to keep it awake. You can create a monitor in UptimeRobot site and use http(s) monitor to visit it every 25 minutes to keep it awake.
Some Interesting Repl Templates
- Free Broswer in Replit - https://replit.com/@York618/Nonepe
Videos
References
- 如何白嫖Replit的免费云服务器建PHP+MySQL网站
- Replit免费服务器搭建超高速节点
- 免费Linux RDP,用来练习linux或者Python,还能做成远程桌面 - Goorm
- https://github.com/techcode1001/replit_root
via Blogger http://blog.51sec.org/2023/01/replit-free-online-ide-saas-website.html
January 30, 2023 at 12:14PM Cloud