├── .gitignore ├── README.md ├── package-lock.json ├── package.json └── server.js /.gitignore: -------------------------------------------------------------------------------- 1 | .glitch-assets 2 | shrinkwrap.yaml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Keeping Glitch Projects Online 24/7 ( ᵔ ᴥ ᵔ ) 2 | 3 | Recently, [Glitch](https://glitch.com) stopped accepting requests from [UptimeRobot](https://uptimerobot.com) to keep projects online. They're now only holding 24/7 projects with the $10/month premium plan. With that type of price, you could pay for a real VPS and not need to use Glitch. 4 | 5 | ------------------------- 6 | 7 | ### Method 1 (Transfer from Glitch to Repl.it) 8 | 9 | To transfer your project from [Glitch](https://glitch.com) to [Replit](https://repl.it), create a free Replit account and then go to the [Glitch Import Page](https://repl.it/glitch). You will have to use Repl.it as your IDE now. 10 | 11 | 1) Make sure your Glitch project is public (so repl.it can copy it) and paste the `glitch.com/edit/#!/project-name` link into the box. 12 | 13 | 2) The language automatically defaults to Linux Bash. [Change the program language](https://i.imgur.com/KSlWcnh.png) to Node.js. 14 | 15 | 3) When everything is set up, you can enable UptimeRobot for your Repl (using [this domain](https://i.imgur.com/ew5swCR.png)) since they don't block it. And, that's it! Your project will now be online 24/7. 16 | 17 | ------------------------- 18 | 19 | ### Method 2 (Using Repl.it as a Pinging Service) 20 | This method will let you continue using Glitch as an IDE, but **it's against Glitch terms of service** so I'm not responsible if you get in trouble for using it. 21 | 22 | 1) Go to the [Github Import Page](https://repl.it/github) and put `github.com/whasonyt/glitch247` in the box. [Change the program language](https://i.imgur.com/KSlWcnh.png) to Node.js. 23 | 24 | 2) Find [this part](https://i.imgur.com/wZBHu0O.png) of the code and add your own sites in. If you're using this for Glitch projects, enter the `project-name.glitch.me` domain. 25 | 26 | 3) When everything is set up, you can enable UptimeRobot for your Repl (using [this domain](https://i.imgur.com/ew5swCR.png)) since they don't block it. And, that's it! Your project will now be online 24/7 by using Repl.it as the middle-man. 27 | 28 | -------------------------- 29 | 30 | ### Method 3 (Buying Glitch Premium) 31 | 1) Go to [Glitch's pricing page](https://glitch.com/pricing) 32 | 2) Click "Choose Pro" and select a pricing type. Click "Choose Pro" again 33 | 3) Pay 34 | _TIP_: If you have a promo code from Glitch's emails, use it 35 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-express", 3 | "version": "0.0.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "express": { 8 | "version": "4.17.1", 9 | "requires": { 10 | "accepts": "~1.3.7", 11 | "array-flatten": "1.1.1", 12 | "body-parser": "1.19.0", 13 | "content-disposition": "0.5.3", 14 | "content-type": "~1.0.4", 15 | "cookie": "0.4.0", 16 | "cookie-signature": "1.0.6", 17 | "debug": "2.6.9", 18 | "depd": "~1.1.2", 19 | "encodeurl": "~1.0.2", 20 | "escape-html": "~1.0.3", 21 | "etag": "~1.8.1", 22 | "finalhandler": "~1.1.2", 23 | "fresh": "0.5.2", 24 | "merge-descriptors": "1.0.1", 25 | "methods": "~1.1.2", 26 | "on-finished": "~2.3.0", 27 | "parseurl": "~1.3.3", 28 | "path-to-regexp": "0.1.7", 29 | "proxy-addr": "~2.0.5", 30 | "qs": "6.7.0", 31 | "range-parser": "~1.2.1", 32 | "safe-buffer": "5.1.2", 33 | "send": "0.17.1", 34 | "serve-static": "1.14.1", 35 | "setprototypeof": "1.1.1", 36 | "statuses": "~1.5.0", 37 | "type-is": "~1.6.18", 38 | "utils-merge": "1.0.1", 39 | "vary": "~1.1.2" 40 | } 41 | }, 42 | "node-fetch": { 43 | "version": "2.6.1", 44 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", 45 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "glitch247", 3 | "version": "1.0.0", 4 | "description": "A couple of methods to keep your Glitch projects online 24/7.", 5 | "main": "server.js", 6 | "scripts": { 7 | "start": "node server.js" 8 | }, 9 | "dependencies": { 10 | "express": "^4.17.1", 11 | "node-fetch": "^2.6.1" 12 | }, 13 | "engines": { 14 | "node": "12.x" 15 | }, 16 | "license": "MIT", 17 | "keywords": [ 18 | "node", 19 | "glitch", 20 | "express" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const fetch = require ('node-fetch') 3 | const app = express(); 4 | 5 | 6 | app.get("/", (req, res) => { 7 | res.send('H E C K Y E A H') 8 | }); 9 | 10 | function pong() { 11 | fetch('https://example.com') 12 | fetch('https://example.org') 13 | 14 | console.log('hAha site ping go BrRRR') 15 | } 16 | 17 | setInterval(pong, 60000); 18 | 19 | 20 | // listen for requests | Don't change this! 21 | const listener = app.listen(process.env.PORT, () => { 22 | console.log("Listening on PORT " + listener.address().port); 23 | }); 24 | --------------------------------------------------------------------------------