最初のノードサーバーの作成
735 ワード
必須ソフトウェア
ステップ2 :オープンVSエディタの端末(キーボードコマンド: Ctrl + ~)
その後、実行
node, express, npm, yarn, or any code editor
ステップ1:デスクトップまたは任意の場所のノードAPIのようなフォルダを作成するコンピュータステップ2 :オープンVSエディタの端末(キーボードコマンド: Ctrl + ~)
その後、実行
yarn init
. クリエイトアpackage.json
ファイル{
"name": "app",
"version": "1.0.0",
"license": "MIT",
}
ステップ3:作成index.js
ファイルapp
フォルダconst express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('I am from Node JS!!')
})
app.listen(4000, () =>{
console.log('server created and listening port 4000')
})
Reference
この問題について(最初のノードサーバーの作成), 我々は、より多くの情報をここで見つけました https://dev.to/bipon68/create-your-first-node-server-3ckdテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol