Thinkjs 2.0 Documentation

Thinkjs 2.0 Documentation

ThinkJS 2.0 Documentation ᳪفள᭛ Օᕨ ጱ Node.js MVC ໛ຝֵ҅አ ES7 Ӿ async/await ҅౲ᘏ ES6ݎෛ୏قThinkJS ฎӞֵྃአ ES6/7 ᇙ௔ තԧࢵٖक़ռग़໛ຝጱᦡᦇቘஷ޾௏ޕӾጱ */yield ᇙ௔஁ବᥴ٬ԧ Node.js Ӿ୑ྍ્ॺጱᳯ̶᷌ݶ෸ ṛප̶̵ܔᓌےNode.js ᶱፓๅ ݎమ҅ᦏ୏ පሲ҅ฎ᩽۠ಅࣁ̶ଚӬෛᇇጱ Node.js ੒ ES6 ᇙ௔Ԟํԧݎᶱፓݢզय़य़൉ṛ୏ݎአ ES6/7 ᇙ௔๶୏ֵ Զᇙ௔ᬮဌํඪ೮҅Ԟݢզ׵ۗ Babel ᖫᦲ๶ඪ೮̶ํֵܨ᫾অጱඪ೮҅ ᇙ௔ ᶱፓݎአ ES6/7 ᇙ௔๶୏ֵ ᇇ๜ӧඪ೮̶੦ٌฎֵڹ׵ۗ Babel ᖫᦲ҅ݢզࣁᶱፓӾय़ᙦֵአ ES6/7 ಅํጱᇙ௔҅෫ᵱ೅ஞߺԶᇙ௔୮ አ async/await ౲ᘏ */yield ๶ᥴ٬୑ྍࢧ᧣ጱᳯ̶᷌ JavaScript //user controller, home/controller/user.js export default class extends think.controller.base { //login action async loginAction(self){ //ইຎฎget᧗࿢҅ፗളดᐏጭ୯ᶭᶎ if(this.isGet()){ return this.display(); } ᬯ᯾ݢզ᭗ᬦpostොဩ឴ݐಅํጱහഝ҅හഝ૪ᕪࣁlogic᯾؉ԧ໊ḵ// let data = this.post(); let md5 = think.md5('think_' + data.pwd); ᯈහഝପӾ੒ԭጱ๵ፓ܃ݸጱੂᎱ݄ੂےአಁݷ޾// let result = await this.model('user').where({name: data.name, pwd: md5}).find(); ձ֜හഝ҅ᤒᐏአಁݷ౲ᘏੂᎱᲙ᧏کᯈ܃ইຎ๚// if(think.isEmpty(result)){ return this.fail('login fail'); } sessionفٟ௳מݸ҅ਖ਼አಁ௳מአಁک឴ݐ// await this.session('userInfo', result); return this.success(); } } ӤᶎጱդᎱ౯ժֵአԧ ES6 ᯾ጱ class , export , let զ݊ ES7 ᯾ጱ async ޾ await ᒵᇙ௔҅ Session ᮷ฎ୑ྍ඙֢҅֕׵ۗ async/await ҅դᎱ᮷ฎݶྍԡٟጱ̶๋ݸֵ فᡱᆐັᧃහഝପ޾ٟ አ Babel ᬰᤈᖫᦲ҅੪ݢզᑞਧᬩᤈࣁ Node.js ጱሾहӾԧ̶ ඪ೮ग़ᐿᶱፓᕮ຅޾ग़ᐿᶱፓሾह ̶ݎཛྷࣘཛྷୗᒵग़ᐿᶱፓᕮ຅҅ݢզჿ᪃ݱᐿᶱፓ॔๥ଶጱ୏ړཛྷࣘཛྷୗ̵ฦ᭗ཛྷୗ̵ܔᶱፓඪ೮ ἕᦊඪ೮ development ҅ testing ޾ prodution 3 ᐿᶱፓሾह҅ݢզࣁӧݶጱᶱፓሾहӥᬰᤈӧݶ ጱᯈᗝ҅ჿ᪃ࣁӧݶሾहӥጱᯈᗝᵱ࿢҅ݶ෸ᬮݢզचԭᶱፓᵱᥝᬰᤈಘ઀̶ ඪ೮ӿ੄ጱහഝପ ThinkJS ඪ೮ mysql ҅ mongodb ҅ sqlite ᒵଉᥠጱහഝପ҅ଚӬ੗ᤰԧஉग़඙֢හഝପጱളݗ҅෫ᵱ ᚆ̶ۑᘶཛྷࣳᒵṛᕆى̵ۓᄋ၏̶ݶ෸ඪ೮Ԫقᒵਞفಋۖ೪ള SQL ᧍ݙ҅ᬮݢզᛔۖᴠྊ SQL ဳ դᎱᛔۖๅෛ Ԟӧአ׵ۗᒫӣ҅ۓNode.js ๐ ސኞප҅ӧአ᯿ܨදݸᒈץ෈կ҅ګThinkJS ٖᗝԧӞॺդᎱᛔۖๅෛጱ๢ ොཛྷ̶ࣘ ୌ REST ളݗڠᛔۖ ইຎమࣁ̶ݎݢਠ౮ REST API ጱ୏ܨୌ REST ളݗ҅ӧአٟձ֜ጱդᎱڠአ thinkjs ޸եݢզᛔֵۖ REST ളݗӾᬦᄁਁྦྷ౲ᘏᬰᤈ๦ᴴ໊ḵ҅Ԟஉො׎॒ቘ̶ ඪ೮ग़ᐿ WebSocket ପ ThinkJS ඪ೮ socket.io ҅ sockjs ᒵଉᥠጱ WebSocket ପ҅ଚӬ੒ᬯԶପᬰᤈ۱ᤰ҅ಾଘݱӻପԏᳵ ᘏӞᛘጱ֛ḵ̶ݎളݗ᧣አӤጱ૧୑҅ᕳ୏ ӿ੄ጱၥᦶአֺ ᚆۑᵑ໛ຝכද᮷ํ੒ଫጱၥᦶአֺ๶ץӞེྯ҅ %95 کጱၥᦶአֺ҅դᎱᥟፍሲᬡ +1500 ํތ ThinkJS ጱᑞਧ̶ ۓඪ೮޸եᤈ᧣አಗᤈਧ෸ձ ੪ݢզஉො׎ګThinkJS ᯾ጱ Action ᴻԧݢզߥଫአಁጱ᧗࿢҅ݶ෸ඪ೮ࣁ޸եᤈӥᦢᳯ҅׵ۗᬯॺ๢ ̶ۓጱಗᤈਧ෸ձ Hook ޾ Middleware ݢզᅎၚጱ੒ᦢᳯ᧗࿢ᬰᤈೝ౼॒ቘ̶҅ګThinkJS ֵአ Hook ޾ Middleware ๢ ᧇᕡጱ෭ப ᚆ҅ݢզஉො׎ጱັ፡ݱᐿ෭ப҅ො׎᭄ັᳯ̶᷌ۑThinkJS ٖᗝԧᧇᕡጱ෭ப HTTP ᧗࿢෭ப [2015-10-12 14:10:03] [HTTP] GET /favicon.ico 200 5ms [2015-10-12 14:10:11] [HTTP] GET /zh-CN/doc.html 200 11ms [2015-10-12 14:10:11] [HTTP] GET /static/css/reset.css 200 3ms Socket ᬳള෭ப [2015-10-12 14:13:54] [SOCKET] Connect mysql with mysql://root:[email protected]:3306 Კ᧏෭ப [2015-10-12 14:15:32] [Error] Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root3'@'localhost' (using password: YES) [2015-10-12 14:16:12] [Error] Error: Address already in use, port:8360. http://www.thinkjs.org/doc/error.html#EADDRINUSE ګӿ੄ጱ᪠ኧ๢ ےଚӬݢզचԭཛྷࣘ๶ᦡᗝ̶ݢզᦏ URL ๅ҅ګ᪠ኧ̵ᶉா᪠ኧᒵग़ᐿ᪠ኧ๢ڞ᪠ኧ̵ᥢڞThinkJS ඪ೮ྋ ᓌ၄ጱݶ෸݈ӧӶ०௔ᚆ̶ ඪ೮ࢵᴬ۸޾ग़Ԇ᷌ ᚆ̶ۑጱොဩ੪ݢզඪ೮ࢵᴬ۸޾ग़Ԇ᷌ᒵܔThinkJS ֵአஉᓌ Өٌ՜໛ຝጱ੒ྲ Ө express/koa ੒ྲ ᶱፓӾᵱᥝ׵ۗय़ᰁጱᒫӣොൊկ಍҅ܔᚆྲ᫾ᓌۑጱ׀ጱ໛ຝ҅໛ຝ๜᫝൉ܔexpress/koa ฎ 2 ӻྲ᫾ᓌ ಅզᅎၚଶྲ᫾ṛ̶ֵ֕አஉग़ᒫӣොᕟկӞොᶎ൉ṛԧᶱፓጱ॔๥ଶ҅ݚӞොᶎᒫӣ҅ݎᚆਠ౮ᶱፓጱ୏ ොൊկᨶᰁ݇૧ӧἶ҅Ԟտଃ๶ٖਂအᄋᒵᷚᴾ̶ koa 1.x ֵአ ES6 ᯾ጱ */yield ᥴ٬ԧ୑ྍࢧ᧣ጱᳯ᷌҅֕ */yield ݝտฎӻᬦჁᥴ٬ොໜ҅տᤩ ES7 ᯾ጱ async/await ಅ๊դ̶ ᚆ᮷ᕪᬦԧӸ໒ጱ௔ᚆ޾ٖਂအᄋᒵොᶎጱၥᦶ҅ଚӬࣁᶱፓӾݢۑԧෆॺᥴ٬ොໜ҅ྯӻ׀ᘒ ThinkJS ൉ զፗളֵአ ES6/7 ಅํጱᇙ௔̶ Ө sails ੒ྲ ොᶎԞஉग़੗ᤰֵ҅አ᩸๶قෆॺᥴ٬ොໜጱ Node.js ໛ຝ҅੒හഝପ̵REST API̵ਞ׀sails ԞฎӞӻ൉ ᫾ො׎̶ྲ ଃ๶உय़ጱӧ׎҅੕ᛘᶱፓӾ෫ݎsails ੒୑ྍࢧ᧣ጱᳯ᷌ᬮဌํս۸҅ᬮฎֵአ callback ጱොୗ҅ᕳ୏ ֕ ဩ᫾অጱֵአ ES6/7 ᇙ௔̶ ThinkJS ጱӧ᪃ Ӥᶎ᧔ԧஉग़ ThinkJS ጱսᅩ҅୮ᆐ ThinkJS Ԟํஉग़ጱӧ᪃̶ইғ ໛ຝᬮྲ᫾ෛ҅ᗌ੝ᐒ܄ᒵොᶎጱඪ೮ ᬮဌํᕪᬦ᩻य़ࣳᶱፓጱ༄ḵ ES6/7 ݇ᘍ෈໩ ԭ ES6/7 ᇙ௔ݢզ݇ᘍӥᶎጱ෈໩ғى JavaScript Promiseᭁ֦ԡ learn-es2015 ᳪف ECMAScript 6 ஞᘏጱ ES2015 ਫ౴ڡ ᕳ JavaScript ECMAScript 6 Features ECMAScript 6 compatibility table ECMAScript 7 Features ECMAScript 7 compatibility table ୌᶱፓڠ ਞᤰ Node.js ਞᤰ Node.js ሾह҅ݢզ݄ ਥො ӥضᵱᥝ҅ڹThinkJS ฎӞྃ Node.js ጱ MVC ໛ຝ҅ಅզਞᤰ ThinkJS ԏ ᫹๋ෛጱਞᤰ۱ᬰᤈਞᤰ҅Ԟݢզ᭗ᬦٌ՜ӞԶჀ᭲ਞᤰ̶ ̶ۑᤒᐏਞᤰ౮ڞ҅ڊ੒ଫጱᇇ๜ݩᬌکਞᤰਠ౮ݸ҅ࣁ޸եᤈಗᤈ node -v ҅ইຎᚆ፡ ๐ۖސ෫ဩڞވᕆ Node.js҅܋ThinkJS ᵱᥝ Node.js ጱᇇ๜ >=0.12.0 ҅ইຎᇇ๜ੜԭᬯӻᇇ๜҅ᵱᥝ ౲ๅṛᇇ๜̶ 4.2.1 کᕆ܋ୌᦓਖ਼ Node.js ᇇ๜̶ۓ ਞᤰ ThinkJS ݢਞᤰ ThinkJSғܨ᭗ᬦӥᶎጱ޸ե Bash npm install thinkjs@2 -g --verbose ইຎਞᤰஉౌጱᦾ҅ݢզ੤ᦶֵአ taobao ጱრᬰᤈਞᤰ̶ٍ֛ইӥғ Bash npm install thinkjs@2 -g --registry=https://registry.npm.taobao.org --verbose ਞᤰਠ౮ݸ҅ݢզ᭗ᬦ thinkjs --version ౲ thinkjs -V ޸եັ፡ਞᤰጱᇇ๜̶ ᴻധ҅ݢզ᭗ᬦڢጱᇇ๜ڹਞᤰᬦ ThinkJS 1.x ጱᇇ๜҅ݢᚆᵱᥝਖ਼ԏڹဳ ғইຎԏ ᴻ̶ڢnpm uninstall -g thinkjs-cmd ޸ե ๅෛ ThinkJS ੴጱ ThinkJSقๅෛ ੴጱ ThinkJSғقݢๅෛܨಗᤈӥᶎጱ޸ե Bash npm install -g thinkjs@2 ๅෛᶱፓ᯾ጱ ThinkJS ᶱፓጱ ThinkJSғڹݢๅෛ୮ܨࣁᶱፓፓ୯ӥ҅ಗᤈӥᶎጱ޸ե Bash npm install thinkjs@2 ୌᶱፓڠ :ୌᶱፓڠThinkJS ਞᤰਠ౮ݸ҅੪ݢզ᭗ᬦӥᶎጱ޸ե Bash thinkjs new project_path; #project_pathԅᶱፓਂනጱፓ୯ ୌӞӻ ES6 ཛྷୗጱᶱፓٍ֛҅ইӥғڠᶱፓጱᦾ҅ݢզݎইຎమአ ES6 ᇙ௔๶୏ Bash thinkjs new project_path --es6; #project_pathԅᶱፓਂනጱፓ୯ ԧғۑୌ౮ڠᤒᐏᶱፓ҅ڊইຎᚆ፡ᥠᔄ֒ӥᶎጱᬌ create : demo/ create : demo/package.json create : demo/.thinkjsrc create : demo/nginx.conf create : demo/README.md create : demo/www/ create : demo/www/index.js create : demo/app create : demo/app/common/runtime create : demo/app/common/config create : demo/app/common/config/config.js create : demo/app/common/config/view.js create : demo/app/common/config/db.js ... create : demo/app/home/logic create : demo/app/home/logic/index.js create : demo/app/home/view create : demo/app/home/view/index_index.html enter path: $ cd demo/ install dependencies: $ npm install run the app: $ npm start ᚆ -> ThinkJS ޸ե̶ۑ᧗ᥠ ಘ઀҅௳מୌᶱፓ޸եጱๅग़ڠԭى ਞᤰׁᩢ ᶱፓፓ୯҅ಗᤈ npm install ਞᤰׁᩢ҅ݢզֵአ taobao რᬰᤈਞᤰ̶فᶱፓਞᤰݸ҅ᬰ Bash npm install --registry=https://registry.npm.taobao.org --verbose ᖫᦲᶱፓ ࣁᶱፓӥಗᤈ޸եضӤԧ --es6 ݇හ҅դᎱᵱᥝᖫᦲݸ಍ᚆᬩᤈ̶ᮎԍᵱᥝےୌᶱፓ෸ڠইຎ දݸ੪տᛔۖᖫᦲԧ̶ץnpm run watch-compile ҅ᬯ໏෈կํ ಗᤈ޸եݸտ೯᩸Ӟӻᬰᑕ҅ဳ఺ӧᥝᕮ๳ᬯӻᬰᑕٌ҅՜޸եݢզٚෛ୏Ӟӻຽᓋᶭ᯾ಗᤈ̶ ݢ̶ইຎฎᘌᶱፓݢܨۓ๐ۖސᚆ҅෫ᵱٚಗᤈᧆ޸ե҅ፗളۑဳ ғ 2.0.6 ᇇ๜୏তٖᗝԧᛔۖᖫᦲጱ ݢҁනܨ ;()դᎱ instance.compileفے ෛᇇ๜҅ᆐݸࣁ෈կ www/index.js๋کᕆ܋ զਖ਼ ThinkJS ҂̶ڹࣁ instance.run() ԏ ᶱፓۖސ ̶ۑ౮ۖސۓᔄ֒ӥᶎጱٖ਻҅ᤒᐏ๐کࣁᶱፓፓ୯ӥಗᤈ޸ե npm start ҅ইຎᚆ፡ [2015-09-21 20:21:09] [THINK] Server running at http://127.0.0.1:8360/ [2015-09-21 20:21:09] [THINK] ThinkJS Version: 2.0.0 [2015-09-21 20:21:09] [THINK] Cluster Status: closed [2015-09-21 20:21:09] [THINK] WebSocket Status: closed [2015-09-21 20:21:09] [THINK] File Auto Reload: true [2015-09-21 20:21:09] [THINK] App Enviroment: development ᦢᳯᶱፓ ݢ̶ܨ /಑୏ၨᥦ࢏҅ᦢᳯ http://127.0.0.1:8360 ᦤ 8360 ᒒݗݢᦢᳯ̶כইຎฎࣁᬱᑕ๢࢏҅ᵱᥝ᭗ᬦᬱᑕ๢࢏ጱ IP ᦢᳯ҅ݶ෸ᥝ ᶱፓᕮ຅ ୌਠᶱፓݸ҅ᶱፓፓ୯ᕮ຅ᔄ֒ইӥғڠ᭗ᬦ thinkjs ޸ե |-- nginx.conf |-- package.json |-- src | |-- common | | |-- bootstrap | | | |-- generate_icon.js | | | `-- middleware.js | | |-- config | | | |-- config.js | | | |-- env | | | | |-- development.js | | | | `-- production.js | | | |-- hook.js | | | |-- locale | | | | |-- en.js | | | | `-- zh-CN.js | | | `-- route.js | | |-- controller | | | `-- error.js | | `-- runtime | `-- home | |-- config | |-- controller | | |-- base.js | | `-- index.js | |-- logic | | `-- doc.js | `-- model |-- view | `-- zh-CN | |-- common | | |-- error_400.html | | |-- error_403.html | | |-- error_404.html | | |-- error_500.html | | `-- error_503.html | `-- home | |-- doc_index.html | |-- doc_search.html | |-- inc | | |-- footer.html | | `-- header.html | |-- index_changelog.html | |-- index_demo.html | `-- index_index.html `-- www |-- favicon.ico |-- index.js |-- production.js `-- static |-- css |-- img `-- js ௛֛ฎᔄ֒ጱ̶֕҅ڦୌጱᶱፓፓ୯๢຅ݢᚆํᕡஙጱ૧ڠဳ ғ೰ਧӧݶጱཛྷୗ nginx.conf ݻդቘ̶ݍnginx ጱᯈᗝ෈կ҅ୌᦓᕚӤֵአ nginx ؉ src ک෸տᛔۖਖ਼ src ፓ୯ӥጱ෈կᖫᦲۖސୌᶱፓ಍ํᧆፓ୯̶ᶱፓڠრդᎱፓ୯ֵ҅አ --es6 ݇හ app ፓ୯ӥ̶ ፗളํ app/ ፓ୯̶ڞୌᶱፓ҅ڠইຎဌํֵአ ES6 ᇙ௔ src/common ጱ҅ common ཛྷࣘӥਂනӞԶ᭗አጱ॒ቘ᭦ᬋ̶ړښ᭗አཛྷࣘፓ୯҅ᶱፓፓ୯᮷ฎೲཛྷࣘ๶ src/common/bootstrap ̶ ᫹҅෫ᵱಋۖ requireےፓ୯҅ᧆፓ୯ӥጱ෈կտᛔۖۖސᶱፓ ᚆ̶ۑහ̵ဳٙӾᳵկᒵଉአጱڍੴقݢզࣁᬯӻፓ୯ӥ෈կ᯾ਧԎӞԶ හڍੴقਧԎ JavaScript // src/common/bootstrap/fn.js global.formatDate = obj => { ... } හ̶ڍහ formatDate ҅ᮎԍᶱፓ᯾ձ֜ࣈො᮷ݢզፗളֵአᧆڍੴقᬯ᯾ਧԎԧӞӻ ဳٙӾᳵկ JavaScript // src/common/bootstrap/middleware.js think.middleware('replace_image', http => { ... }); ᬯ᯾ਧԎԧӞӻӾᳵկ replace_image ҅ᮎԍ੪ݢզࣁᯈᗝ෈կ hook.js ᯾ਖ਼ᧆӾᳵկဳٙᬰ݄ԧ̶ ဳ ғbootstrap ݝᚆනࣁ common ཛྷࣘ᯾̶ src/common/config ᯈᗝ෈կ҅ᬯ᯾නӞԶ᭗አጱᯈᗝ̶ Ӿғ᪠ኧᯈᗝ̵hook ᯈᗝ̵๜ࣈ۸ᯈᗝᒵ஠ᶳනࣁᬯ᯾̶ٌ JavaScript 'use strict'; /** * config */ export default { //key: value }; src/common/controller ද̶ץ࢏̶ٌӾ error.js ᯾Კ᧏॒ቘጱӧݶᤈԅ҅ᶱፓ᯾ݢզ໑ഝᵱᥝᬰᤈګ࢏҅නӞԶ᭗አጱഴګഴ src/common/runtime ᶱፓᬩᤈ෸ኞ౮ጱӞԶፓ୯҅ইғᖨਂ෈կፓ୯҅አಁӤփጱ෈կԁ෸ਂනጱፓ୯̶ src/home දᯈᗝ default_moduleץhome ཛྷࣘ҅ᶱፓἕᦊཛྷ̶ࣘݢզࣁ src/common/config/config.js Ӿ ๶᯿ෛਧԎἕᦊཛྷ̶ࣘ src/home/logic አڹྋଉ̵୮ވݳဩ̵൉Իጱහഝฎވғ݇හฎތᬰᤈ᭦ᬋ໊ḵ҅ݢզ۱ضݢզڹ᭦ᬋ॒ቘ̶ྯӻ඙֢ಗᤈ ๦ᴴᒵ̶ᬯ໏ݢզᴳ֗ controller ᯾ጱ action ጱ॔๥ଶ̶ํވአಁฎڹ૪ᕪጭ୯̵୮ވಁฎ JavaScript 'use strict'; /** * logic * @param {} [] * @return {} [] */ export default class extends think.logic.base { /** * index action logic * @return {} [] */ indexAction(){ } } src/home/controller ̶ ࢏̶Ӟӻ url ੒ଫӞӻ controller ӥጱ actionګഴ JavaScript 'use strict'; import Base from './base.js'; export default class extends Base { /** * index action * @return {Promise} [] */ indexAction(){ //auto render template file index_index.html return this.display(); } } src/home/model ඙̶֢ىཛྷ̶ࣳහഝପፘ view ᥤࢶፓ୯҅ਂන੒ଫጱཛྷᇇ෈կ̶ইຎඪ೮ࢵᴬ۸޾ग़Ԇ᷌҅ᮎԍᥤࢶፓ୯ӥᵱᥝํ੒ଫጱৼፓ୯̶ www ྌፓ୯ӥ̶کᶱፓጱݢᦢᳯ໑ፓ୯҅nginx ᯾ጱ໑ፓ୯տᯈᗝ www/development.js ݗ෈կ̶فද̶ www/production.js ԅᕚӤጱץݗ෈կ҅ݢզ໑ഝᶱፓᵱᥝᬰᤈفཛྷୗӥᶱፓጱݎ୏ ද̶ץݗ෈կጱդᎱᔄ֒ইӥ҅ݢզ໑ഝᶱፓᵱᥝᬰᤈف JavaScript var thinkjs = require('thinkjs'); var path = require('path'); var rootPath = path.dirname(__dirname); var instance = new thinkjs({ APP_PATH: rootPath + '/app', ROOT_PATH: rootPath, RESOURCE_PATH: __dirname, env: 'development' }); instance.compile({retainLines: true, log: true}); instance.run(); www/static ਂනӞԶᶉாᩒრ෈կ̶ դᎱᥢ᝜ ෈կ᪠ஆ஠ᶳੜٟ ᶱፓ҅֕Ӟᛱ᮷᮱ᗟ Linux ᔮᕹӥ̶ݎฎࣁ Windows ౲ᘏ Mac OSX ᔮᕹӥ୏ײஉग़෸ य़ੜٟጱ̶ᬯ໏உ਻ฃړ܄य़ੜٟጱ҅ᘒ Linux ӥฎړ܄ࣁ Windows ޾ Mac ᔮᕹӥ҅෈կ᪠ஆฎӧ ಸᲙԧ̶ܩሾहӥฎঅጱ҅֕Ӥᕚݸݎሿ෈կय़ੜٟጱᳯ᷌੕ᛘ୏ڊ ෸҅ThinkJS տ༄ၥᶱፓӥ෈կۖސۓኞ҅෈կ᪠ஆੱᰁ᮷ֵአੜٟਁᒧ̶ଚӬࣁ๐ݎጱ٭ᬯᐿఘعԅԧ᭿ ᦄ҅ইғޞտڞ᪠ஆ҅ইຎํय़ٟਁྮ [2015-10-13 10:36:59] [WARNING] filepath `admin/controller/apiBase.js` has uppercases. ᖽᬰֵአ 2 ӻᑮ໒ դᎱےෙ҅౲ᘏํӞԶ୑ྍ඙֢҅ᬯԶ᮷տीڣ᭦ᬋྲ᫾॔๥҅ํݱᐿ๵կײ෸ํ҅ݎࣁ Node.js ሾहӥ୏ ጱᖽᬰ̶ ୌᦓֵአ 2 ӻᑮ໒֢ԅᖽᬰ̶਼҅ڜአԧॡग़ጱܛԅԧӧᛗԭᦏᖽᬰ ݎአ ES6 ᧍ဩ୏ֵ ᓌ၄ṛප̶ےES6 Ӿํय़ᰁጱ᧍ဩᔥݢզᓌ۸౯ժጱդᎱ҅ᦏդᎱๅ Զ᧍ဩӧඪ೮҅Ԟݢզ᭗ᬦ Babel ᖫᦲ๶ඪ೮̶ ಅํֵܨNode.js ๋ෛᇇ๜૪ᕪ᫾অጱඪ೮ԧ ES6 ጱ᧍ဩ҅ ᶱፓԧ̶ݎአ ES6 ᧍ဩ๶୏ֵײզฎ෸ ӧᥝֵአ constrcutor ොဩ ᛔۖ᧣አ̶ইғײᔄਫֺ۸ጱ෸کݢզֵአ constrcutor ොဩᬡ҅ײୌᔄጱ෸ڠአ ES6 ᯾ጱ class ๶ֵ JavaScript export

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    238 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us