2018년 10월 20일 토요일

nodejs 모듈 사용하기

main.js
var mo =require("./hi");



hi.js

exports.A=function(){}

module.exports = {
 A : fucntion(){}
}
module.exports는 개별 함수가 아닌 객체를 통째로 exports할 때 사용하라고 나와있다


moduel require은 한번만 실행한다. 



exports로 공개한 모듈은 객체 생성하는게아니라 캐시로 저장됨
-> 다른 곳에서 다시 사용하면 저장된 값을 불러옴

flutter 기본 개념 1

  Scaffold  - 화면 뼈대 역할  - 기본적으로 AppBar body floatingActionButton 같은걸 배치해줌  return Scaffold (       appBar : AppBar ( title : const Text ...