简体   繁体   English

Meteor simple todos server/main.js 和 client/main.js 的区别是什么?

[英]Meteor simple todos what is the deference between server/main.js and client/main.js?

Meteor simple-todos tutorial (react version) is not working. Meteor simple-todos 教程(反应版)不起作用。 There is already a startup script section on server/main.js but in the tutorial they are instructing to put that startup block on client/main.js . server/main.js上已经有一个启动脚本部分,但在教程中他们指示将该启动块放在client/main.js

What am I missing here?我在这里缺少什么?

Files in the server folder are run only on the server and files in the client folder are only run on the client. server文件夹中的文件仅在服务器上运行,而client文件夹中的文件仅在客户端上运行。

If the tutorial is telling you to modify the client/main.js file, they do indeed mean to only edit the client/main.js file.如果教程告诉您修改client/main.js文件,它们确实意味着只编辑client/main.js文件。

Meteor.startup just tells meteor to run this bit after all Meteor code is ready, which is immediately after the server starts on the server, and after the page has loaded on the client. Meteor.startup只是告诉meteor 在所有Meteor 代码准备好后运行这个位,也就是在服务器启动服务器之后,以及在客户端加载页面之后。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM