Test Script for Checking NodeJS Hosting
Let's create a simple test script that we will upload to the hosting to test its operation.
We will have two files. The application file:
import express from 'express';
let app = express();
app.get('/', function(req, res) {
res.send('it works');
});
app.listen(3000, function() {
console.log('running');
});
And the package.json file:
{
"type": "module",
"dependencies": {
"express": "^4.18.2"
}
}
Create files with the test script. Test its operation on your local machine.