일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- restapi
- RESTful
- sqldeveloper
- springboot
- Maven
- springboot #controller #jsp
- apache
- oracle
- ojdbc
- 스프링부트 #springboot #project #Intellij
- 스프링부트
- Developer
- install
- 웹개발
- SpringSecurity
- IntelliJ
- Oracle11g
- Database
- mssql
- SpringInitializer
- 환경변수
- tcping
- 스프링시큐리티
- mysql
- Tomcat #SpringFramework
- postman
- Web
- development
- undefined
- HATEOAS
Archives
- Today
- Total
여백에 도장 찍기
Node.js 설치 및 실행 본문
1. brew를 통해 Node.js 설치
>>> brew install node
>>> node -v 10:35.30 화 1 11 2022 >>>
v17.3.0
>>> npm -v 10:35.33 화 1 11 2022 >>>
8.3.0
2. 간단하게 Node.js 실행해보기
>>> mkdir ~/projects
>>> cd ~/projects
>>> vi hello-world.js
const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello, World!\n');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
>>> node hello-world.js
Server running at http://127.0.0.1:3000/
3. 참조
https://nodejs.org/api/synopsis.html
Usage and example | Node.js v17.3.1 Documentation
Usage and example# Usage# node [options] [V8 options] [script.js | -e "script" | - ] [arguments] Please see the Command-line options document for more information. Example# An example of a web server written with Node.js which responds with 'Hello, World!'
nodejs.org
'Node.js' 카테고리의 다른 글
yarn install (0) | 2022.01.11 |
---|
Comments