📅  最后修改于: 2022-03-11 15:02:52.293000             🧑  作者: Mango
//This is a simple nodejs API By Kamala Fizzet
const express=require("express");
const app=express();
const cors=require("cors");
//Setting middlewares
app.use(express.urlEncoded({extended:true}));
app.use(express.json());
app.use(cors());
app.get("/", (req, res){
res.json({message:"This is a homepage"})
})
const port=3200;
app.listen(port, () =>{
console.log(`Server running on port ${port}`)});