728x90

전체 글 294

웹호스팅하기 (2) - vercel + react 배포하기

https://vercel.com/guides/deploying-react-with-vercel How to Create & Deploy a React App to VercelLearn how to create a React app and deploy it live with Vercel in only a few steps.vercel.comhttps://velog.io/@codns1223/Etc-Vercel%EB%A1%9C-React-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EB%B0%B0%ED%8F%AC%ED%95%98%EA%B8%B0 [Etc] Vercel로 React 프로젝트 배포하기Vercel은 Next.js 개발 팀에서 만든 프론트엔드 배포 자동화할 수 있게 빌드,배포..

서비스 배포 2024.05.23

웹호스팅하기 (1) - vercel + express.js + mongodb 배포하기

https://vercel.com/guides/using-express-with-vercel How to Deploy an Express.js Application to VercelLearn how to deploy an Express.js application to Vercel using Serverless Functions.vercel.com * 프로젝트 초기설정하기  const express = require("express");const app = express();app.get("/", (req, res) => res.send("Express on Vercel"));app.listen(3000, () => console.log("Server ready on port 3000."));module...

서비스 배포 2024.05.22

ESModule 로 express 작성하기

{ "name": "webrtc", "version": "1.0.0", "description": "", "main": "server.mjs", // 확장자 변경 "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "nodemon ./src/server.mjs" // 명령어 작성 }, "author": "", "license": "ISC", "dependencies": { "express.js": "^1.0.0", "pug": "^3.0.2" }, "type": "module" // 추가}ESModule 을 사용하기 위해서는 "type": "module" 을 설정해야 한다. 또한, ..

비주얼 스튜디오 코드 (vsc)에서 리액트 사용시 Emmet 적용하기

File -> Preferences -> Settings 로 이동한다.Workspace 탭에서 Extensions 메뉴를 열고, Emmet 을 선택한다.Preferences 에서 Edit in settings.json 링크를 클릭한다.{ "emmet.preferences": { }, "emmet.includeLanguages": { "javascript": "javascriptreact" }}settings.json 파일에 위와 같이 작성하고, 비주얼 스튜디오 편집기를 끄고 재시작한다.

이미지 업로드 - multer

https://medium.com/@hassaanistic/image-handeling-using-multer-in-react-d7fea28e8dc6  multer 를 이용하여 이미지를 업로드하는 방법은 두가지가 있다. 첫번째는 이미지를 서버로 전송하면 특정폴더에 저장하고, 폴더에 저장된 이미지 데이터를 DB에 저장하고, 브라우저로 이미지 데이터를 보낸다. 두번째는 이미지를 서버로 전송하면 특정폴더에 저장하고, 폴더에 저장된 이미지 경로를 브라우저로 전송하고, 브라우저에서 해당경로의 파일 데이터를 읽는 방식이다. 즉, 브라우저로 이미지 데이터를 보내느냐, 이미지 경로를 보내느냐의 차이다. 또는 서버쪽에서 이미지 데이터를 조회하느냐 프론트쪽에서 이미지 데이터를 조회하느냐의 차이다. 아래 코드는 두번째 방법..

노드 cors 에러 해결하기 - Error: unable to verify the first certificate

https://velog.io/@satoshi25/TIL-714-Warning-Setting-the-NODETLSREJECTUNAUTHORIZED-environment TIL 7/14 Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment오늘은 시험을 봤다. 그 중에서 잘 몰랐던 부분들을 찾아보면서 나름 문제의 원인을 찾은 경험을 남겨봤다. https 모듈을 사용하여 express로 api 문서대로 구현하는 것이 목표였다. 시험의 문제와는velog.io  * 노드 서버 https 설정하기https://charming-kyu.tistory.com/46 [node.js] localhost https 적용 (SSL)서론 로컬에서 개발할 때 http://l..

728x90