---
# System prepended metadata

title: node.js

---

# node.js
----
* [client server ](https://ithelp.ithome.com.tw/articles/10193877)
* [globalThis](https://ithelp.ithome.com.tw/articles/10249876)
* [nodejs modules](https://miahsuwork.medium.com/%E7%AC%AC%E4%B8%89%E9%80%B1-node-js-%E5%9F%BA%E7%A4%8E-module-exports-%E5%92%8C-require-2f9f6915d9f0)


globalThis===global(ES2020)
![](https://i.imgur.com/9NPAkF5.png =x200)


![](https://i.imgur.com/OHgvxz6.png =x150)


![](https://i.imgur.com/s88ZMM2.png =x150)
* nodejs_udemy是檔名

* globalThis 可以跑在 ==node== 和 ==window== 

* [node.js require用法](https://blog.csdn.net/kaosini/article/details/8085731)


module
![](https://i.imgur.com/iEOn3md.png)

----

* script.js
![](https://i.imgur.com/6p6nabh.png =x200)

* script2.js
![](https://i.imgur.com/vP8zHjh.png =x200)

----

![](https://i.imgur.com/Da21Q1L.png)

[nodemon教學](https://andy6804tw.github.io/2017/12/24/nodemon-tutorial/#%E4%BD%BF%E7%94%A8)



----
* JSON.stringify(object)---->轉為json型式
![](https://i.imgur.com/ybRJZ5O.png =x300)
