How curious, in testing I get this error when I hash out:
It reports it as undefined when referenced.
A console.log(process.env);
also doesn’t include USER_COOKIE.
Yea… I just moved to paid cloud services.
NOTICE
There have been reports of errors happening while using this API. I have contacted the creator and will keep this post updated on the status.
FIX
To fix this, please re-create your glitch site with the updated link.
Shoutout to @jeditcdisback for helping to fix this issue.
Note: I have received word that documentation has been updated, and this issue should not occur anymore.
glitch = bad for deployment
Glitch is designed for development and not for deploying production grade apps, especially ones you want to keep under and
You’re not wrong just look at what happened to Krunnie, what would you recommend as a free or affordable alternative to glitch?
(before glitch I used repl, this is infact the first time I have used glitch and it seems simple but realtively easy and smooth to use for basic stuff like this.)
As glitch is made for web hosting it falls asleep after 5mins since last call so to keep it alive you will want to add a new script, call it what you want, I called it KeepAlive.js
; Within this type:
const http = require('http');
const express = require('express');
const app = express();
app.get("/", (request, response) => {
console.log(Date.now() + " Ping Received");
response.sendStatus(200);
});
app.listen(process.env.PORT);
setInterval(() => {
http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
}, 280000);
Script via https://anidiots.guide/
Thanks for this!
Alternatively, you could use a site like UpTime Robot to visit your site every so often, although this will make keeping Glitch site’s awake way easier.
I added this into the site template, since it will definitely help.
Nothing in the world is free. I’d personally suggest DigitalOcean—although it can be more costly.
Generally, just look for what you specifically need in a cloud service provider.
I recommend Firebase. You won’t be able to do this on the free plan because you can’t send HTTP requests to non-Google services with Firebase Functions. Your best bet would be to go onto the Pay as you go plan. This plan is 100% free as long as you stay within the free tier usage and you can send HTTP requests wherever you need.
To get started with Firebase Functions check here!
Firebase is backed by Google infrastructure and security. It scales 100% automatically and is designed for production use.
Hope this helps!
I would honestly highly recommend buying a VPS for $5/Month from DigitalOcean and host the nobolox.js server on there. It would be way more secure than using glitch.
There are other alternatives, Currently I am using a Pterdactyl Panel to host my bot(s). They offer Free hosting on their VPS, aswell as paid. Such as
:buy: Paid Discord Plan #1
RAM - 128MB
CPU - 4x 3.90 GHz (Fully Unlocked)
Disk - SSD 1 GB
LOCAT - France
NODE - fr1.eu
Database - YES
Extra Port - YES
Support : Dedicated
PRICE - 1$
:buy: Paid Discord Plan #2
RAM - 512MB
CPU - 4x 3.90 GHz (Fully Unlocked)
Disk - SSD 2 GB
LOCAT - France
NODE - fr1.eu
Database - YES
Extra Port - YES
Support : Dedicated
PRICE - 2$
:buy: Paid Discord Plan #3
RAM - 1024MB
CPU - 4x 3.90 GHz (Fully Unlocked)
Disk - SSD 4 GB
LOCAT - France
NODE - fr1.eu
Database - YES
Extra Port - YES
Support : Dedicated
PRICE - 3$
(Copied from their plans channel)
It is perfect for this type of Bot, (Screenshots from my custom API that i made for British Army using Bloxy.
(96 MB - 99 MB) in Memory.
(Less than 1% CPU).
Thanks for making this kind of work it will help others with cafes and restaurants that want to make an automated application center. This will make them happy so they don’t have to rank them themselves.
Didn’t work for me. I have no idea what I was doing so I gave up, haha?
I would be happy to help you. Please message me with the errors you are receiving.
When running require('dotenv').config({ path: './.env' })
.I get syntax error near unexpected token `‘dotenv’’
Any way to stop the glitch app from sleeping? That’s kind of what breaks my thing.
You need to install dotenv FIRST in the command line.
I do cover it in my tutorial, Also make sure your path is correct i.e ./.env
Ah I see it, thank you. This really helped.
I dont see the console. I only see the output.