Facebook Twitter Instagram
    DeepCrazyWorld
    Facebook Twitter Instagram Pinterest YouTube
    • FLUTTER
      • FLUTTER APP
        • QRCode
        • Quiz App
        • Chat GPT
        • PDF App
        • News App
        • Fitness App
        • Weather App
        • BMI Calculator
        • GAME APP
        • Ecommerce App
        • wallpaper App
        • Finance app
        • Chat App
        • Wallet App
        • Taxi App
        • Quran app
        • Music player app
      • FLUTTER UI
        • Splash Screen
        • Onboarding Screen
        • Login Screen
        • Card Design
        • Drawer
    • PROJECT
      • Android Projects
      • College Projects
      • FLUTTER APP
      • Project Ideas
      • PHP Projects
      • Python Projects
    • SOURCE CODE
    • ANDROID
      • ANDROID APP
      • GAME APP
      • ANDROID STUDIO
    • MCQ
      • AKTU MCQ
        • RPA MCQ
        • COA MCQ
        • HPC MCQ
        • SPM MCQ
        • Renewable Energy All MCQ
        • Data Compression MCQ
        • Data Structure MCQ
        • Digital Image Processing MCQ
        • Software Engineering MCQ
        • Machine Learning MCQ
        • Artificial Intelligence MCQ
      • D PHARMA MCQ
        • Pharmaceutics – I MCQ
        • Pharmacognosy MCQ
        • Pharmaceutical Chemistry MCQ
        • Biochemistry and Clinical Pathology MCQ
        • Human Anatomy and Physiology MCQ
        • Heath Education and Community Pharmacy MCQ
    • INTERVIEW QUESTIONS
      • Flutter Interview Questions
      • INTERVIEW QUESTIONS
      • Python Interview Questions
      • Coding ninjas solution
    • MORE
      • WORDPRESS
        • SEO
        • TOP 10 WORDPRESS THEME
      • PRODUCTIVITY
      • Program
      • QUOTES
    DeepCrazyWorld
    Home»COLLECTION»How to make get and post API in Node js 2021 (updated)
    COLLECTION

    How to make get and post API in Node js 2021 (updated)

    DeepikaBy DeepikaNovember 14, 2021Updated:January 19, 2022No Comments2 Mins Read

    How to make get and post API in Node js – API stands for “application programming interface.” APIs allow one application to “talk-to” another to allow for the transfer of stored data or instructions. API’s are everywhere in your daily life, from the embedded YouTube videos on social media applications to the smart speaker on your kitchen counter. They make it possible for software developed at different times by different people to interact and, thereby, increase functionality and productivity.

    <img decoding=

    Table of Contents

    Toggle
    • GET API in NodeJS
    • POST API in NodeJS
    • How to Install Visual Studio Code 2019 for Windows 10 || VS Code
    • Complete Source Code here get and post API in Node js
    • Output
    • Additional Reading
    • READ MORE

    GET API in NodeJS

    const express=require('express')
    const app=express()
    const port=3000
    //get APi as printed Welcome Home
    app.get('/get',(req,res)=>{
        res.send("Welcome HOME ")
    })
    app.listen(port,()=>{
        console.log(`server running on the port ${port}`)
    })

    POST API in NodeJS

    
    const express=require('express')
    const app=express()
    const port=3000
    app.post('/post',(req,res)=>{
         res.send("Welcome Home")
     })
     app.listen(port,()=>{
         console.lo(`server running on the port ${port}`)
     })

    How to Install Visual Studio Code 2019 for Windows 10 || VS Code

    Complete Source Code here get and post API in Node js

    const express=require('express')
    const app=express()
    const port=3000
    //get APi as printed Welcome Home
    app.get('/get',(req,res)=>{
        res.send("Welcome HOME ")
    })
    app.listen(port,()=>{
        console.log(`server running on the port ${port}`)
    })
    
    
    // //post API as printed Welcom Home
    // const express=require('express')
    // const app=express()
    // const port=3000
    // app.post('/post',(req,res)=>{
    //     res.send("Welcome Home")
    // })
    // app.listen(port,()=>{
    //     console.lo(`server running on the port ${port}`)
    // })

    Output

    <img loading=

    I hope my interview experience will be helpful for you. Best of luck with your job interview.

    Additional Reading

    • SEO Practices Everyone Should Follow SEO Rules
    • Complete Top SEO Checklist
    • Yoast Seo Premium 15.2 Nulled – WordPress SEO Plugin
    • Top 50+ SEO Interview Questions
    • What is a Backlink? How to Get More Backlinks
    • TCS INTERVIEW QUESTIONS – CLICKE HERE

    READ MORE

    If you found this post useful, don’t forget to share this with your friends, and if you have any query feel free to comment it in the comment section.

    Thank you 🙂 Keep Learning !

    Share. Facebook Twitter LinkedIn WhatsApp Telegram Pinterest Reddit Email
    Previous ArticleUGC NET Syllabus Paper 1 Download for CSE student (updated)
    Next Article What is an API? How to call an API From Android (Updated)

    Related Posts

    Top List of Countries and Country Codes 2023

    COLLECTION 2 Mins Read

    Top Best places to find royalty free images for personal & commercial

    COLLECTION 9 Mins Read

    Top 10 Node js Project Ideas & Topics 2021-22 (UPDATED)

    PROJECT 6 Mins Read

    Top 10+ Best FREE Online Google Courses With Certification (2021-22)

    COLLECTION 11 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • Implementing a Dynamic FAQ Screen UI in Flutter Using ExpansionTile March 29, 2025
    • Creating an Instruction UI Screen in Flutter Application March 29, 2025
    • Animated Backgrounds in Flutter: A Complete Guide March 15, 2025
    • How to make Diary App using flutter stepwise using getx August 31, 2024
    • How to Create Music Player UI screen with fully functional in flutter August 30, 2024
    • How to make ListView Builder Ui in flutter with Source Code August 29, 2024
    • Create a TabBar View in flutter with fully functional stepwise August 28, 2024
    • How to create TabBar view in flutter with source code step wise August 27, 2024
    • How to make Heart rate measure app with Flutter stepwise August 26, 2024
    • How to make ChatGpt App in flutter with source code Stepwise August 25, 2024
    Facebook Twitter Instagram Pinterest YouTube
    • About
    • Contact
    • Disclaimer
    • Privacy Policy
    Copyright by DeepCrazyWorld © 2025

    Type above and press Enter to search. Press Esc to cancel.