개발용 테스트 웹 서버 띄우는 방법

for php

https://www.php.net/manual/en/features.commandline.webserver.php
(빌트인)(웹 캐시 안한다)
php -S 127.0.0.1:81
php -S 0.0.0.0:8000


$ php -S 127.0.0.1:81
[Sat Feb 22 17:43:10 2025] PHP 7.4.33 Development Server (http://127.0.0.1:81) started



for node.js

https://www.npmjs.com/package/http-server
(라이브러리 설치 필요)(웹캐시 한다)
npm install -g http-server
http-server -p 81

$ http-server
Starting up http-server, serving ./

http-server version: 14.1.1

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:
  http://192.168.0.3:8080
  http://127.0.0.1:8080
Hit CTRL-C to stop the server



for python

https://docs.python.org/3.4/library/http.server.html
(빌트인)(웹 캐시 안한다)
python -m http.server 8000


$ python -m http.server 8000
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
댓글
  • / / Invalid Date
    -
  • 권한이 없습니다.
목록형 📷 갤러리형
제목
[기본형] HTML (with 부트스트랩5.3 , jquery 3.7, vue.js)
유용한 리눅스(LINUX) 명령어
[공지] 기술 게시판
3.30
3.31
4.1
4.2
4.3
4.4
4.5
4.6
4.9
4.10
4.11
4.12
4.13
4.14
4.15
4.16
4.17
4.19
4.20
4.21
4.22
4.23
4.24
4.25
4.26
4.27
4.28
4.29
4.30
5.1
5.2
5.3