jimlv commited on
Commit
b8f67ff
·
verified ·
1 Parent(s): c92c180

Create apps/app1/main.js

Browse files
Files changed (1) hide show
  1. apps/app1/main.js +11 -0
apps/app1/main.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const http = require('http');
2
+
3
+ const server = http.createServer((req, res) => {
4
+ res.writeHead(200, { 'Content-Type': 'text/plain' });
5
+ res.end('Hello from App 1\n');
6
+ });
7
+
8
+ const PORT = process.env.PORT || 3001;
9
+ server.listen(PORT, () => {
10
+ console.log(`App 1 running on port ${PORT}`);
11
+ });