GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — nodejs-app-mss/app.js at master · MithunTechnologiesDevOps/nodejs-app-mss Expand file tree/ Copy pathapp.jsMore file actions 95 lines (71 loc) · 2.89 KB / Copy pathapp.jsFile metadata and controls95 lines (71 loc) · 2.89 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 var express = require("express"); const path = require('path'); const cfenv = require('cfenv'); var app = express(); var appEnv = cfenv.getAppEnv(); var url = process.env.url app.set('port', (process.env.PORT || 9981)) app.use(express.static(__dirname + '/images')) /* app.get("/getCall", function(req,res){ console.log("GET Method caled"); console.log(__dirname); res.send("<h2>Welcome to Node JS express app</h2>"+appEnv.url+appEnv.port+port+process.env.LOGNAME); }).listen(9009); console.log(__dirname+"/images/mithunlogo.jpg"); */ app.get('/mithuntechnologies', function(request, response) { //response.send("<h2><center>Welcome to Node JS app</h2>"); response.set("Content-Type","text/html"); response.write("<h2><center><u>Sameple Node JS Application </u></center></h2>"); response.write("<h2><center>Welcome to Mithun Technologies. Please Contact +91-9980923226 +91-9980923216 +91-9014996877 for more information or send an email to [email protected] <center></h2>" ); response.end(); }) app.get('/docker', function(request, response) { //response.send("<h2><center>Welcome to Node JS app</h2>"); response.write("<h2><center><u>Node JS Sample App </u></center></h2>"); response.write("<h2><center>Welcome to Docker</h2>" ); response.write("<h2><center>Welcome to Mithun Technologies. Please Contact +91-9980923226 +91-9980923216 +91-9014996877 for more information or send an email to [email protected] <center></h2>" ); response.end(); }) //app.get("/html", function(req,res){ app.get("/html", function(req,res){ res.set("Content-Type","text/html"); //res.contentType("html") ; res.write("<h2>Welcome</h2>"); res.write("<h2>/html call</h2>"); //must end res.end(); }); app.get("/jsonData", function(req,res){ res.type('json'); //res.type('application/json'); //res.json({'name': 'Mithun Reddy L'}); res.send({ 'name': 'Mithun Technologies', 'technology': 'DevOps', 'contact' : '9980923226', 'email': '[email protected]' }); }); app.get("/queryparam", function(req,res){ //res.send(req.query); res.send(req.query.key + ": " + req.query.name); }); app.get("/status-code-404", function(req, res) { //set content-type to application/json //res.sendStatus(404); res.status(404).send('Sorry, we cannot find that!'); }) app.get("/status-code-500", function(req, res) { //set content-type to application/json //res.sendStatus(500); res.status(500).send('Internal Server Error – custom message'); }) app.get('/redirect', function(req, res) { //Send status 300 res.redirect('http://mithuntechnologies.com'); }); app.listen(app.get('port'), function() { console.log("Node JS app is running at http://localhost:" + app.get('port') +"/mithuntechnologies"); }) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |