commit 3306723c171434773a8e746a481d6e3beeeeb5b1 Author: Gerardo Marx Date: Thu Oct 15 09:51:55 2026 -0600 first example nodejs diff --git a/index.js b/index.js new file mode 100644 index 0000000..2492f5e --- /dev/null +++ b/index.js @@ -0,0 +1,12 @@ +const express = require('express'); +const app = express(); +const http = require('http'); +const server = http.createServer(app); + +app.get('/', (req, res) => { + res.send('

Hello Marx!

'); +}); + +server.listen(3333, () => { + console.log('listen on port 3333'); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..e3bd897 --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "nodejs-first-example", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "express": "^4.22.3" + } +}