Skip to content

Host your repl.it project 24/7 with this code!, compatible with Node.JS.

Notifications You must be signed in to change notification settings

NotNexuss/NodeJS-Project-Hoster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 

Repository files navigation

Node.JS 24/7 Project Hoster

This code is only compatible for node.js. For python, click me!


Applying

Open your main repl file (example: index.js, app.js, main.js etc...) and at the top and the end of the code, paste this simple code inside:

Top of the code:

const keepAlive = require(`./server`);

End of the code:

keepAlive();


After that, create a new file named `server.js` and copy paste this code inside the file:
const express = require('express');
const server = express();

server.all(`/`, (req, res) => {
    res.send(`Please connect me to a hosting website in-order to work 24/7.`);
});

function keepAlive() {
    server.listen(3000, () => {
        console.log(`24/7 Activation Complete`);
    });
}

module.exports = keepAlive;


Finally, connect the web address given at top right corner to a hosting website. I use freshping the most.



Contact me:

ItzSidhan | YouTube Discord Twitter


Languages and Tools:

JavaScript Node.js GitHub Visual Studio Code

About

Host your repl.it project 24/7 with this code!, compatible with Node.JS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages