const http = require('http'); http.createServer((request, response) => { const { headers, method, url } = request; let body = []; request.on('error', (err) => { console.error(err); }).on('data', (chunk) => { body.push(chunk); }).on('end', () => { body = Buffer.conc…
const http = require('http'); // 우선 웹서버 객체를 만듭니다. http.createServer((request, response) => { // 생성한 서버에서 request를 받아 처리할 수 있습니다. const { headers, method, url } = request; // request에는 url, method, header 등의 정보가 포함됩니다. let body = []; // post나 put의 request에서 stream으로 전달되는 data와 end를 이용하면 body를…
const express = require('express') const mysql = require('mysql') const path = require('path') const static = require('serve-static') const dbconfig = require('./config/dbconfig.json') // Database connection pool const pool = mysql.createPool({ connectionLimit: 10, host: dbconfig.host, …
HTML Formatter Free online tool to format an ugly HTML code, making it readable and pretty, with the proper indentation. Autodetect HTML XML CSS JavaScript PHP JSON 이것은 "HTML Formatter"라는 온라인 도구에 대한 설명입니다. 이 도구는 복잡하거나 지저분한 HTML 코드를 읽기 쉽게 예쁘게 포맷팅해주는 도구입니다. 코드에 적절한 들여쓰기를 추가해주어 가독성을 높여줍니다. …