xxxxxxxxxx
.background {
background-image: url('name.jpeg');
background-repeat: no-repeat;
background-size: 100%;
}
xxxxxxxxxx
NodeJs is Runtime environment for executing Js code, Outside Of Browser.
it is build upon Chrome v8 engine using c++.
Uses of Node:
-can build back-end services like API which can be used as backend for
diferent platform Apps(Website, MobileApp, Desktop App).
-is Asynchronous by default means Single thread handle all the request
and response, thereby providing more speed, highly scalable, built time half
compare to other tech in market, 33% few line of code, 40% fewer files,
can handle 2times more requests/secs, 35% fast response time.
// Hope you like the short Description.
xxxxxxxxxx
Node js allows you to run javascript outside of your browser
ex: you are able to run it on your terminal
xxxxxxxxxx
Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.
xxxxxxxxxx
// server.mjs
import { createServer } from 'node:http';
const server = createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World!\n');
});
// starts a simple http server locally on port 3000
server.listen(3000, '127.0.0.1', () => {
console.log('Listening on 127.0.0.1:3000');
});
// run with `node server.mjs`
xxxxxxxxxx
const { subtle } = require('crypto').webcrypto;
async function generateEcKey(namedCurve = 'P-521') {
const {
publicKey,
privateKey
} = await subtle.generateKey({
name: 'ECDSA',
namedCurve,
}, true, ['sign', 'verify']);
return { publicKey, privateKey };
}
xxxxxxxxxx
const express = require('express');
const app = express();
app.get('/', (req, res) =>{
res.status(200).json({
success: true,
data: {
message: "Welcome To Node Server .",
},
});
});
app.listen(1000, () => {
console.log(`server connected successfully on port 1000`);
})
xxxxxxxxxx
When you install Node.js, you can do these things:
Make web servers
Run JavaScript without an HTML file
and more!
xxxxxxxxxx
so if you are looking to download Node.js for windows 7
the last working version of node.js that works on windows 7 is
"https://nodejs.org/download/release/v13.6.0/"