My first MERN code

Hello Bishal from Learn Code In Nepali, l'll the possible tutorials for MEAN development basically this is my personal repo for all the code and you can use these code for learning purpose .  i will try to write what code will do in NEPALI language by using the comment .


First code ;
this will be code from index.js file of first lesson 



const express = require("express");
const app = express();

// const port = 3000

// app.get('/', (req, res) => res.send('Hello World!'))
// app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`))


const port =3639;
app.get('/',(reqres ) => {
    // callback method doesnt have the name but work just as an method
    return res.send("hello there");
})
app.get('/login',(reqres ) => {
    // callback method doesnt have the name but work just as an method
    return res.send("login page ");
})
app.get("/logout",(reqres ) => {
    return res.send(" ..... log out .....");
})
app.get("/h" ,(req,res=> {
    return res.send(" ...this is hitesh insta...");

    // yedi  maile localhost:portnumber (jun mathi defined gareko xa tyo )eg:localhost:3639/h garda mathiko message webpage ma dekhinxa
    
})

app.listen(port,() => {
 console.log("Hello Bishal tere "+port) ;  
 // we usually return something here 
})

Comments

Popular posts from this blog

basic html and css practice 1st day code repo