본문 바로가기

react

(8)
8. next.js 개발환경에서 인증서 없이 HTTPS 사용하기 - 프록시 설정 - 개발자 PC에서 실행 local-ssl-proxy 설치 : 별도의 CMD에서 실행 $ npm install -g local-ssl-proxy $ local-ssl-proxy --source 3001 --target 3000 => 자동 실행 할수 있도록 확인 필요 https://www.npmjs.com/package/local-ssl-proxy - next.js 설정 동일하게 실행후 접근 확인 http://client.test.com:3000 https://client.test.com:3001 인증되지 않은 인증서이지만 한번 확인하면 사용 가능
7. next js : dotnet에서 EUC-KR 로 HttpUtility.UrlDecode 된 2차원 배열 쿠키 사용 yarn add decode-uri-component-charset https://github.com/gtgalone/decode-uri-component-charset#readme import cookies from 'next-cookies'; import { decodeURIComponentCharset } from 'decode-uri-component-charset'; .... export function Get(context: any) : IAuthManager { let authMgr : IAuthManager = init(); let allCookie = cookies(context); if(!(typeof allCookie === 'undefined' || allCookie=== null)..
6. next js 사용자 별 페이지 접근 제어 - HOC - 참조 https://github.com/vercel/next.js/discussions/10925#discussioncomment-12471 - /hoc/withAuthServerSide.tsx import { Toast } from "antd-mobile"; import { checkPrime } from "crypto"; import { useRouter } from "next/router"; import React from "react"; import * as AuthManager from '../components/manager/AuthManager' export interface AccesResultModel { canAccess :boolean; retUrl : string; message..
5. next js 서버 배포 및 실행 - IIS ( Windows Server 2008 R2, IIS7 기준) - 참조 deploy next js on iis web server https://www.youtube.com/watch?v=HLsx0iraA-Y 0. node 설치 windows server 2008 R2 에서 최신 버전 설치 불가 16.x, 14.x 설치불가 12.x 로 설치 : node-v12.22.7-x64.msi https://nodejs.org/download/release/latest-v12.x/ 1. IISNODE 설치 https://github.com/tjanczuk/iisnode 2. URL rewrite module for IIS https://www.iis.net/downloads/microsoft/url-rewrite 3. 서버폴더에 배포 [C:\iis_node] [.next] -..
4. next js 프로젝트 SVN으로부터 프로젝트 Checkout 받아서 실행하기 0. Visual Studio Code > 보기 > 터미널 실행 후 아래 경로로 이동 PS D:\Workspace\REACT> 1. SVN 에서 checkout 프로젝트 Cntl + Shipt + P > SVN:Checkout Repository URL : https://svn.mysvn.co.kr:8443/svn/React/nextjs-sample-app 폴더선택 : D:\Workspace\REACT\ 폴더이름 : nextjs-sample-app-checkout * 확인을 위해 폴더이름을 다른곳에 생성하여 chekcout 시킵니다. 2. yarn install node_modules 에 패키지들 설치 3. 확인 http://localhost:3000/
3. next js 프로젝트 생성 및 SVN 연동 및 chekcout 까지 진행 0. 요약 VSCode 에서 checkin 하는 방법을 찾지 못하여 반대로 진행 기존 서비스를 위해 SVN을 사용하고 있고, 최초 react 도입 시점에 버전관리툴은 유지 app 이름 : nextjs-sample-app 1. SVN Repository 내 저장소 생성 React > nextjs-sample-app 2. next js app 생성 PS D:\Workspace\REACT> PS D:\Workspace\REACT> yarn create next-app --typescript nextjs-sample-app 3. SVN Checkout 으로 생성한 프로젝트 폴더와 연결 VSCode > 보기 > 터미널 열어 Cntl + Shipt + P > SVN:Checkout Repository URL : h..
2. next js 기본도구 설치 - visual studio code 설치 및 SVN 도구 설치 1. VSCode 설치 https://code.visualstudio.com/ 2. SVN 도구 설치 https://dzzienki.tistory.com/64 svn.exe 경로 c:\Program Files\TortoiseSVN\bin\ svn.exe 없는 경우 : 윈도우 버튼 마우스 오른쪽 클릭 > 앱 및 기능 > TotoiseSVN 수정 클릭 > modify > command line 추가 설치 - node 설치 node --version https://nodejs.org/en/ 다운로드 및 설치 - npm 최신 버전 인스톨 npm install -g npm@latest - npx 최신 버전 인스톨 npm install -g npx@l..
1. next js 도입을 위한 학습 - NPM-과-NPX-그리고-Yarn 라이브러리 관리 도구 https://velog.io/@zeebeck/NPM-%EA%B3%BC-NPX-%EA%B7%B8%EB%A6%AC%EA%B3%A0-Yarn https://blog.naver.com/heunghari/221790041786 - Next js (React Framework) Next.js는 Node.js를 기반으로 구축된 오픈 소스 개발 프레임워크로, 서버 측 렌더링 및 정적 웹사이트 생성과 같은 React 기반 웹 애플리케이션 기능을 가능하게 합니다. https://nextjs.org/docs/getting-started - typescript https://velog.io/@pluviabc1/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%..