byeonghun_app_2021[1]
3996 ワード
ソースのパージ
Git Remote Removeはソースから削除できます.拭き取って新しいレシピを追加しました

クライアントの作成 make a folder
$npx create-react-app client
$mkdir server
in client,
$git init
$git remote add origin GITREPO
(make a .md file)
$git add .
$git push origin master
make a folder
$npx create-react-app client
$mkdir server
in client,
$git init
$git remote add origin GITREPO
(make a .md file)
$git add .
$git push origin master
$npx create-react-app client
所与のフォルダ内で修正する.サーバの作成 in client cd ..
cd server
make a index.js file
$npm init
$npm install express body-parser mysql
$npm install nodemon
in "scripts": {} of package.json (server)
- add "start": "node index.js",
- "devStart": "nodemon index.js",
in client cd ..
cd server
make a index.js file
$npm init
$npm install express body-parser mysql
$npm install nodemon
in "scripts": {} of package.json (server)
- add "start": "node index.js",
- "devStart": "nodemon index.js",
"devStart": "nodemon index.js",
俊傑としてnpm run devStart
nodemonは、私がコードを変更するたびにnodemonがすぐに実行され、サーバに直接適用される(ただしページはリフレッシュしなければならない)
const express = require('express');
const app = express();
app.listen(3000, () => {
console.log('running on port 3000');
});
node index.js
則
http://localhost:3000/
に入ると、以下のようにgetリクエストを受けていない.
app.get('/', (req, res) => {
res.send('hello world');
});

Reference
この問題について(byeonghun_app_2021[1]), 我々は、より多くの情報をここで見つけました https://velog.io/@hunsm4n/byeonghunapp20211テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol