vantagens e desvantagens
meteor create petit
client/main.js # a JavaScript entry point loaded on the client
client/main.html # an HTML file that defines view templates
client/main.css # a CSS file to define your app's styles
imports/api # API files
imports/startup # Startup files
imports/ui # UI files
server/main.js # a JavaScript entry point loaded on the server
package.json # a control file for installing NPM packages
.meteor # internal Meteor files
.gitignore # a control file for git
cd petit
meteor
import { Meteor } from 'meteor/meteor';
import '../imports/api/pets.js';
import '../imports/api/vaccine.js';
Meteor.startup(() => {
// code to run on server at startup
});
import { Meteor } from 'meteor/meteor';
import { render } from 'react-dom';
import '../imports/startup/accounts-config.js';
import '../imports/startup/client/routes';
import { Account } from 'meteor/accounts-base';
Accounts.ui.config({
passwordSignupFields: 'USERNAME_ONLY',
});
meteor add accounts-ui accounts-password
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Template } from 'meteor/templating';
import { Blaze } from 'meteor/blaze';
export default class AccountsUIWrapper extends Component{
componentDidMount(){
this.view = Blaze.render(Template.loginButtons,
ReactDOM.findDOMNode(this.refs.container));
}
componentWillUnmount(){
Blaze.remove(this.view);
}
render(){
return <span ref="container" />;
}
}
export default class App extends Component{
render(){
<AccountsUIWrapper />
}
}