박기홍

최종보고서 업로드

.DS_Store
node_modules/
......
from typing import Optional
from fastapi import FastAPI
import datetime
app = FastAPI()
@app.get("/")
async def plainText():
return {"hi"}
@app.get("/time")
async def read_time():
now = datetime.datetime.now()
return {now}
@app.get("/query/")
async def read_query(id: int = 0):
return {id}
\ No newline at end of file
const express = require('express');
const app = express()
const port = 3000;
app.get('/', (req, res) => {
res.send("hi");
})
app.get('/time', (req, res) => {
const time = new Date();
res.send(time);
})
app.get('/query', (req, res) => {
res.send(req.query.id)
})
app.listen(port, () => {
console.log("express server services on port 3000")
})
\ No newline at end of file
{
"name": "node-temp",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"express": "^4.17.1"
}
}
This diff is collapsed. Click to expand it.
This file is too large to display.
This file is too large to display.
No preview for this file type