페이지 선택
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in pages

아래의 내용은 추후 정리할 내용을 임시로 붙여 놓은 것입니다.

 

http 서버를 로컬에서 실행

https://docs.microsoft.com/ko-kr/gaming/playfab/features/authentication/platform-specific-authentication/running-an-http-server-for-testing

————————————– 위의 사이트 내용 ———————————————-

일부 시나리오에서는 테스트 목적으로 로컬 HTTP 서버를 실행해야 할 수도 있습니다.

예를 들어 Facebook 및 HTML5, Google 및 HTML5, Twitch 및 HTML5를 사용하여 PlayFab 인증 설정에 관한 자습서를 따르고 있고 도메인이 있는 원격 서버가 없는 경우 이 자습서가 유용할 수 있습니다.

필수 조건
설치된 Node.JS
NPM를 사용하여 HTTP 서버 설치
시스템에서 명령줄/터미널을 실행합니다(현재 어떤 디렉터리에 있는지는 중요하지 않습니다).

npm install -g http-server를 실행합니다. NPM이 끝나면 작은 HTTP 서버가 설치됩니다. 다 되었습니다.

파일 제공
정적 파일을 제공할 시스템에서 새 폴더를 만듭니다. Windows의 경로에 대한 특별한 제한이 없습니다.

Mac OS에서는 폴더에 대한 액세스를 확인하는 것이 좋습니다. 새로 만든 폴더 안에 index.html이라는 파일을 만듭니다.

아래에 제공된 내용으로 파일을 채웁니다.

HTML

복사
<!doctype html>

<html lang=”en”>
<head>
<meta charset=”utf-8″>
<title>My Page</title>
</head>

<body>
<p>Hello world!</p>
</body>
</html>
명령줄/터미널 및 cd를 실행하여 index.html 파일이 있는 폴더로 이동하고 다음을 수행합니다.

http-server를 실행합니다.
HTTP 서버는 현재 디렉터리에서 파일을 제공하기 시작합니다.
또한 서버가 수신 중인 모든 IP 엔드포인트가 출력됩니다
그 중 하나를 사용하여 브라우저를 통해 웹 서버에 연결합니다.
로드되는 페이지를 관찰합니다.
http-server 명령을 사용하여 파일 제공

선택적으로 서버를 실행할 포트를 지정할 수 있습니다.

예: http-server -p 80을 실행하여 포트 80에서 서버를 실행합니다. 포트가 사용 중인 경우 HTTP 서버를 다시 실행하기 전에 이 포트를 사용하는 애플리케이션을 찾아서 종료해야 합니다.

———————————– 내용 끝 ——————————————-

 

https 관련 참조

https://www.npmjs.com/package/http-server

——————————————– 위의 사이트 내용 ————————————————-

TLS/SSL

First, you need to make sure that openssl is installed correctly, and you have key.pem and cert.pem files. You can generate them using this command:

openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem

You will be prompted with a few questions after entering the command. Use 127.0.0.1 as value for Common name if you want to be able to install the certificate in your OS’s root certificate store or browser so that it is trusted.

This generates a cert-key pair and it will be valid for 3650 days (about 10 years).

Then you need to run the server with -S for enabling SSL and -C for your certificate file.

http-server -S -C cert.pem

If you wish to use a passphrase with your private key you can include one in the openssl command via the -passout parameter (using password of foobar)

e.g. openssl req -newkey rsa:2048 -passout pass:foobar -keyout key.pem -x509 -days 365 -out cert.pem

For security reasons, the passphrase will only be read from the NODE_HTTP_SERVER_SSL_PASSPHRASE environment variable.

This is what should be output if successful:

Starting up http-server, serving ./ through https

http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  https://127.0.0.1:8080
  https://192.168.1.101:8080
  https://192.168.1.104:8080
Hit CTRL-C to stop the server

---------------------------- 내용 끝 ----------------------------

Adsense

 

 WiFi IoT Module

 

www.mxchip.com

 

 

 Bluetooth Module

www.feasycom.com

 

 

 5G/LTE/CAT-M1/NB-IoT

 

www.simcom.com

 

Viewed Page List