What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-03 23:00:19
use windows command line
Set-ExecutionPolicy Bypass -Scope Process -Force; nodemon ./bin/www var debug = require('debug')('cssgui:server'); var http = require('http'); var app = require('../app'); //app.js that is var createError = require("http-errors")... Add solution -
Javascript 2021-11-03 19:59:15
create node js server
const http = require('http'); const hostname = '127.0.0.1'; const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World'); }); server.listen(port, ... Add solution -
Javascript 2021-10-30 07:29:10
nodejs websocket tutorial
/* Author: Logan Smith - Perkins */ // Importing the http library, used to start servers const http = require('http'); // Importing the websocket library which is used to interface between webpage and nodejs const WebSocketServer = require('websocket').s... Add solution -
Javascript 2021-10-29 00:51:16
http request without a library in javascript
const http = require('http'); const url = 'http://api.weatherstack.com/current?access_key=29f9cf0e577a785e1dfb23a049e2336c&query=40,-75'; const request = http.request(url, (response) => { let data = '' response.on('data', (chunk)=> { //... Add solution -
Javascript 2021-10-26 14:16:12
if (req.url === "/script.js")
var http = require('http'); var url = require('url'); var fs = require('fs'); var path = require('path'); http.createServer(function(req, res) { if (req.url === '/') { fs.readFile('./index.html', function(err, data) { if (err){ ... Add solution -
Javascript 2021-10-08 13:18:12
implementing node js app on server and runing npm
const http = require('http'); const hostname = '127.0.0.1'; const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World'); }); server.listen(port, ... Add solution -
Javascript 2021-10-05 14:49:03
render html in node js
let http = require('http'); let fs = require('fs'); let handleRequest = (request, response) => { response.writeHead(200, { 'Content-Type': 'text/html' &nbs... Add solution -
Javascript 2021-10-03 20:04:04
serving html and css with node js
// HTTP Module for Creating Server and Serving Static Files Using Node.js // Static Files: HTML, CSS, JS, Images // Get Complete Source Code from Pabbly.com var http = require('http'); var fs = require('fs'); var path = require('path'); http.createServe... Add solution