+ 1

how servers are created in js

I do not know how to create a server in js, please help

9th Apr 2021, 7:57 PM
Osadchy Daniel
Osadchy Daniel - avatar
7 Respuestas
+ 4
https://www.tutorialsteacher.com/nodejs/create-nodejs-web-server#:~:text=%2F%2F%20Import%20Node.-,js%20core%20module%20var%20server%20%3D%20http.,%2F%2F%20set%20response%20content%20res.
9th Apr 2021, 8:11 PM
ÃKR
ÃKR - avatar
+ 2
https://www.sololearn.com/post/1007982/?ref=app Why to go other places if you have tutorial here only!! You can create server using nodejs !! What is nodejs how to use it? You will get all your answers here :) Be happy, All the best
10th Apr 2021, 12:38 AM
Abhiyantā
Abhiyantā - avatar
+ 1
You'll need Node.js for this. Here's a good guide for creating something very basic. https://www.digitalocean.com/community/tutorials/how-to-create-a-web-server-in-node-js-with-the-http-module Once you manage this and understand it, you can create something more complex with multiple routes which handle different request types. For that, you'll probably want Express.js
9th Apr 2021, 8:12 PM
CamelBeatsSnake
CamelBeatsSnake - avatar
+ 1
Osadchy Daniel Learn about Node.js
9th Apr 2021, 8:12 PM
A͢J
A͢J - avatar
+ 1
Oh, thanks. Grateful for the help ^_^
9th Apr 2021, 8:31 PM
Osadchy Daniel
Osadchy Daniel - avatar
9th Apr 2021, 8:34 PM
Apongpoh Gilbert
Apongpoh Gilbert - avatar
0
You can use node js. // try following code const http = require('http'); const requestListener = function (req, res) { res.writeHead(200); res.end('Hello, World!'); } const server = http.createServer(requestListener); server.listen(8080);
28th Dec 2021, 4:22 PM
Happy Coder
Happy Coder - avatar