Sida loo abuuro app 45 daqiiqo gudahood Meteor? Haddii aad rabto inaad si dhakhso leh oo sahlan u horumariso moobilka ama shabakadda internetka, Meteor waa aaladda kuugu habboon. Maqaalkan, waxaan ku bari doonaa talaabo talaabo ah sida loo sameeyo app 45 daqiiqo oo kaliya adoo isticmaalaya Meteor. Uma baahnid inaad khabiir ku noqoto barnaamijyada, maadaama Meteor uu yahay madal fududaysa horumarinta codsiyada iyadoo la isticmaalayo JavaScript. Inta lagu jiro casharkan, waxaad ogaan doontaa sifooyinka Meteor iyo sida ugu badan ee looga faa'iidaysan karo si loo abuuro app adiga kuu gaar ah. Ha lumin fursadan si aad u noqoto horumariye app in ka yar hal saac!
- Talaabo talaabo ➡️ Sida loo abuuro app 45 daqiiqo gudahood Meteor?
Sida loo abuuro app 45 daqiiqo gudahood Meteor?
Maqaalkan, waxaanu ku hagi doonaa talaabo talaabo si aad u abuurto arji adigoo isticmaalaya madal Meteor ah 45 daqiiqo oo kaliya. Meteor waa qaab-dhismeedka isha furan kaas oo kuu oggolaanaya inaad si dhakhso leh oo hufan u horumariso codsiyada shabakadda. Raac tillaabooyinkan si aad u abuurto abkaaga waqti yar gudaheed:
- 1 Tallaabo: Diyaarinta deegaanka horumarinta:
- Si aad u bilowdo, hubi in aad ku rakibtay Node.js nidaamkaaga.
- Marka xigta, fur terminaalkaaga oo socodsii amarka soo socda si aad u rakibto Meteor:
- 2 Tallaabo: Samee mashruuc Meteor cusub:
- Terminalka, u gudub hagaha meesha aad rabto inaad ka abuurto mashruucaaga.
- Ku socodsii amarka soo socda si aad u abuurto mashruuc Meteor cusub:
- Tani waxay abuuri doontaa hage cusub oo loo yaqaan "My-app" oo leh qaabka aasaasiga ah ee mashruuca Meteor.
- 3 Tallaabo: Bilow server-ka Meteor:
- Terminalka dhexdiisa, u gudub hagahaaga mashruuca ee cusub:
- Ku socodsii amarka soo socda si aad u bilowdo server-ka Meteor:
- Mar uu seerfarku shaqeeyo, waxaad awoodi doontaa inaad aragto abkaaga biraawsarka laga helo http://localhost:3000.
- 4 Tallaabo: Dhis is dhexgalka isticmaalaha:
- Fur tifaftiraha qoraalka aad jeceshahay oo u gudub hagaha mashruucaaga.
- Wax ka beddel faylka "my-app.html" si aad u dhisto is-dhexgalka isticmaale ee abkaaga, addoo isticmaalaya HTML iyo qaab-dhismeedka Meteor.
- Ku dar walxaha lagama maarmaanka ah, sida badhamada, foomamka ama miisaska, si app-kaagu u yeesho shaqayn.
- 5 Tallaabo: Ku dar codsiga macquulka ah:
- Faylka "my-app.js", ku qor koodka JavaScript ee lagama maarmaanka u ah in lagu daro abkaaga macquulka ah.
- Halkan waxaad ku maarayn kartaa dhacdooyinka, samayn kartaa hawlgallada xogta oo si firfircoon u maamula interface-ka isticmaalaha.
- Adeegso API-ga iyo hawlaha ay bixiso Meteor si aad uga dhigto abkaaga mid is dhexgal iyo firfircooni leh.
- 6 Tallaabo: Dirista codsiga:
- Marka aad dhammayso dhisidda iyo tijaabinta abkaaga, waa markii aad geyn lahayd server-ka daruuraha.
- Waxaad isticmaali kartaa adeegyada sida Heroku ama Galaxy si aad si sahal ah ugu geyso abkaaga Meteor.
- Raac tilmaamaha uu bixiyo adeegga martigelinta ee aad doorato inaad soo geliyaan abkaaga.
curl https://install.meteor.com/ | sh
meteor create mi-app
cd mi-app
meteor
Tillaabooyinkan fudud, waxaad ku abuuri kartaa abka shaqaynaya adigoo isticmaalaya Meteor 45 daqiiqo gudahood. Ku raaxayso habka horumarinta oo ha ka waaban inaad tijaabiso hawlaha ay bixiso goobtan xoogga badan!
Q&A
S&A: Sidee loogu abuuraa app 45 daqiiqo gudahood Meteor?
1. Waa maxay Meteor?
Meteor waa qaab-dhismeedka horumarinta shabakada isha furan ee loo isticmaalo in lagu horumariyo codsiyada webka iyo mobaylka. waqtiga dhabta ah.
2. Maxaa loo baahan yahay si loo abuuro app leh Meteor?
Si loo abuuro app Meteor, waxaad u baahan doontaa:
- Ha lagu rakibo Node.js kombiyuutarkaaga.
- Ku rakib Meteor adoo isticmaalaya npm ku rakib amarka meteor.
3. Sideen u bilaabo mashruuc cusub oo Meteor ah?
Si aad u bilowdo mashruuc cusub oo Meteor ah, raac talaabooyinkan:
- Fur terminalka oo u gudub galka meesha aad rabto inaad ka abuurto mashruuca.
- Samee meteor samee amarka project_name si aad u abuurto mashruuc Meteor cusub.
- Gal galka mashruuca adoo isticmaalaya amarka cd project_name.
4. Sideen ugu socodsiiyaa barnaamijka Meteor ee browserka?
Si aad app Meteor ugu socodsiiso browserka, raac talaabooyinkan:
- Fur terminalka oo u gudub galka mashruuca
- Orod amarka meteor si aad u bilowdo codsiga.
- Furan browserkaaga oo aad ciwaanka http://localhost:3000.
5. Sideed ugu dari kartaa xog ururin cusub gudaha Meteor?
Si loogu daro xog ururin cusub gudaha Meteor, samee tillaabooyinka soo socda:
- Ku samee fayl cusub oo la yiraahdo collection_name.js galka 'imports/api'
- Qeex xog ururin cusub adoo isticmaalaya Mongo.Ururinta('collection_name') shaqada cusub.
- Dhoofinta ururinta si aad uga dhigto mid la heli karo faylasha kale.
6. Sideed u abuurtaa waddo cusub Meteor?
Si aad waddo cusub ugu abuurto Meteor, raac tillaabooyinkan:
- Ku samee fayl cusub oo loo yaqaan pathname.js galka 'imports/ui'
- Qeex waddo cusub adiga oo isticmaalaya shaqada soo dejinta {Router} ee 'meteor/iron:router'.
- Ku hagaaji jidka addoo isticmaalaya Router.route('route', { … }).
7. Sideen ugu dari karaa template wadada Meteor?
Si loogu daro jaantuska dariiqa Meteor, buuxi tillaabooyinka soo socda:
- Samee template cusub adiga oo isticmaalaya soo dejinta shaqada { Template } ee 'meteor/templating'.
- Ku xidh templateka waddo addoo isticmaalaya qaabka: 'template_name' hantida ku jirta habaynta dariiqa.
- Ku dar HTML code gudaha template si aad u qeexdo waxa ku jira.
8. Sideen u daabacaa xog ururinta Meteor?
Si aad u daabacdo xog ururin Meteor, raac tillaabooyinkan:
- Ku samee fayl cusub oo la yiraahdo post_name.js galka 'imports/api'
- Qeex daabacaad cusub adoo isticmaalaya shaqada Meteor.publish('publication_name', function() { … }).
- Shaqada daabacaadda, isticmaal habka 'kan' si aad u gasho ururinta una soo celiso xogta aad rabto inaad daabacdo.
9. Sideed ugu biirtaa xog ururinta Meteor?
Si aad isu diiwaan geliso xog ururinta Meteor, buuxi tillaabooyinka soo socda:
- Ku samee fayl cusub oo la yiraahdo subscription_name.js galka 'imports/api'
- Qeex rukhsad cusub adoo isticmaalaya Meteor.subscribe('subscription_name') shaqada.
- Faylka template ee u dhigma, isticmaal shaqada Template.template_name.onCreated(function() { … }) oo hawsha gudaheeda adeegso habka Meteor.subscribe('subscription_name') si aad u rukunto xogta.
10. Sideen u geeyaa Meteor app server?
Si aad u geyso Meteor app server-ka, raac tillaabooyinkan:
- Soo gal galka mashruuca ee terminalka.
- Ku socodsii amarka meteor build –directory/build_folderpath si aad u dhisto nooc codsi ah oo la soo ururiyay oo ku jira galka dhismaha.
- Isticmaal qalab sida NGINX ama Apache si aad u dejiso martigelinta arjiga la soo ururiyey ee serverkaaga.
Anigu waxaan ahay Sebastián Vidal, injineer kombuyuutar oo xiiseeya farsamada iyo DIY. Intaa waxaa dheer, anigu waxaan ahay abuuraha tecnobits.com, halkaas oo aan ku wadaago casharrada si aan tiknoolajiyada uga dhigo mid la heli karo oo qof walba la fahmi karo.