박기홍

최종보고서 업로드

1 .DS_Store 1 .DS_Store
2 +node_modules/
......
1 +from typing import Optional
2 +from fastapi import FastAPI
3 +
4 +import datetime
5 +
6 +app = FastAPI()
7 +
8 +@app.get("/")
9 +async def plainText():
10 + return {"hi"}
11 +
12 +@app.get("/time")
13 +async def read_time():
14 + now = datetime.datetime.now()
15 + return {now}
16 +
17 +@app.get("/query/")
18 +async def read_query(id: int = 0):
19 + return {id}
...\ No newline at end of file ...\ No newline at end of file
1 +const express = require('express');
2 +
3 +const app = express()
4 +const port = 3000;
5 +
6 +app.get('/', (req, res) => {
7 + res.send("hi");
8 +})
9 +
10 +app.get('/time', (req, res) => {
11 + const time = new Date();
12 + res.send(time);
13 +})
14 +
15 +app.get('/query', (req, res) => {
16 + res.send(req.query.id)
17 +})
18 +
19 +app.listen(port, () => {
20 + console.log("express server services on port 3000")
21 +})
...\ No newline at end of file ...\ No newline at end of file
1 +{
2 + "name": "node-temp",
3 + "version": "1.0.0",
4 + "main": "index.js",
5 + "license": "MIT",
6 + "dependencies": {
7 + "express": "^4.17.1"
8 + }
9 +}
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