markmunyaka
markmunyaka
RRailway
Created by markmunyaka on 10/8/2024 in #✋|help
Deploy Barebones Node.js
How do I deploy a barebones Node.js app? I'm getting a build error Nixpacks build failed. For this file, no build command is required. Only a start command node index.js and the port 8080. It's just one file in a repo index.js. It has the following contents:
const http = require('http');

const server = http.createServer((req, res) => {
res.setHeader('Content-Type', 'text/html');
res.end('<h1>Hello World!</h1>');
});

server.listen(8080);
const http = require('http');

const server = http.createServer((req, res) => {
res.setHeader('Content-Type', 'text/html');
res.end('<h1>Hello World!</h1>');
});

server.listen(8080);
Railway Project ID: 6f6c6ce8-b285-491b-abd2-8358475e2a5c
4 replies