λ΄ ν
μ€νΈ μ±μ λ€μ κ²½κ³ κ° νμλλ κ²μ μ μΈνκ³ λ μ μ»΄νμΌλκ³ μμ΅λλ€.
"μ€μν μ’
μμ±: μ’
μμ± μμ²μ ννμμ
λλ€."
(base) marco<strong i="7">@pc01</strong>:~/webMatters/vueMatters/PeerJS-VueJS-Test$ npm run serve
> [email protected] serve /home/marco/webMatters/vueMatters/PeerJS-VueJS-Test
> vue-cli-service serve
INFO Starting development server...
98% after emitting CopyPlugin
WARNING Compiled with 1 warnings
7:22:25 PM
warning in ./node_modules/peerjs/dist/peerjs.min.js
Critical dependency: the request of a dependency is an expression
App running at:
- Local: http://localhost:8080
- Network: http://ggc.world/
Note that the development build is not optimized.
To create a production build, run npm run build.
μ΄κ²μ webpack.config.jsμ λλ€.
{
"mode": "development",
"output": {
"path": __dirname+'/static',
"filename": "[name].[chunkhash:8].js"
},
"module": {
"rules": [
{
"test": /\.vue$/,
"exclude": /node_modules/,
"use": "vue-loader"
},
{
"test": /\.pem$/,
"use": "file-loader"
}
]
},
node: {
__dirname: false,
__filename: false
},
resolve: {
extension: ['*', '.pem'],
},
devServer: {
watchOptions: {
aggregateTimeout: 300,
poll: 1000
},
https: true,
compress: true,
public: 'ggc.world:8080'
}
}
ν΄κ²° λ°©λ²μ λν μμ΄λμ΄κ° μμ΅λκΉ?
peerjsμ ν¨κ» create-react-appμ μ¬μ©ν λλ μ΄ λ¬Έμ κ° λ°μν©λλ€.
peerjs v0.3.18 λ° μ΅μ λ²μ μμλ μ΄ λ¬Έμ κ° λ°μν©λλ€.
"λ°μ": "^16.13.1"
"λ°μ μ€ν¬λ¦½νΈ": "3.4.1"
λ€μμ μ¬μ©ν λλ μ΄ λ¬Έμ κ° λ°μν©λλ€.
{
"peerjs": "^1.3.1",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12"
}
λ€μμ μ¬μ©ν λλ μ΄ λ¬Έμ κ° λ°μν©λλ€.
{ "peerjs": "^1.3.1", "webpack": "^4.43.0", "webpack-cli": "^3.3.12" }
λ΄κ° ν릴 μλ μμ§λ§ webpack-cliλ₯Ό νλ‘μ νΈμ μΌλΆκ° μλ μ μμ μΌλ‘ μ€μΉνλ κ²μ΄ μ’μ΅λλ€.
@jextrevor
λ΄κ° ν릴 μλ μμ§λ§ webpack-cliλ₯Ό νλ‘μ νΈμ μΌλΆκ° μλ μ μμ μΌλ‘ μ€μΉνλ κ²μ΄ μ’μ΅λλ€.
κ°μ¬ν©λλ€!
peerjsμ ν¨κ» create-react-appμ μ¬μ©ν λλ μ΄ λ¬Έμ κ° λ°μν©λλ€.
create-react-app μμ λμΌν κ²½κ³ κ° νμλ©λλ€. μ λ°μ΄νΈκ° μμ΅λκΉ?
μ΄λ€ μ΄μ λ‘ peer.call(userId, selfStream);
κ° μ μλμ§ μμμΌλ‘ νμλ©λλ€.
μ λ₯Ό λμμ£ΌμΈμ - μ μ²μκ° μ¬κΈ° μμ΅λλ€ . λ°©μ λ§λ€κ³ μ£Όμ νμμ€μ νμ URLμ 볡μ¬νμ¬ λΆμ¬λ£μ΄ μ¬λμ μ°Έμ¬ν΄ 보μΈμ. κ·Έλ¬λ©΄ μ½μμ μ€λ₯κ° νμλ©λλ€.
μ¬κΈ°μμ μ¬μ νμ΄ λ¬Έμ κ° λ°μν©λλ€.
λλμ΄ λ¬Έμ κ° μμ΅λλ€ : μ 겨μλ :
κ°μ₯ μ μ©ν λκΈ
peerjsμ ν¨κ» create-react-appμ μ¬μ©ν λλ μ΄ λ¬Έμ κ° λ°μν©λλ€.