Previous tutorials are based on the 0.9.x official update to 0.10.x after the environment configuration changes are relatively large
Simple features.
1
The sails command is updated, but the old command still supports it.
Custom sails commands can be built on your own
2
API Module Component injection can be customized
3
Modified part of the 0.9.x Bug and plugin bug
4
More Intelligent Automatic Routing
(PS: But I still like the Handwriting database code)
5
About the SAILS socket upgrade
Now not only does the model-mode publish/Subscribe support global Publish subscriptions for Sails objects
6
Some of your own error messages are more perfect.
500 404 400 And so on,
You can take a look at these files when you build the project.
7
Curd list
. Findoneby in <attribute>
()
. Findoneby like <attribute>
()
. FindBy in <attribute>
()
. FindBy like <attribute>
()
. CountBy in <attribute>
()
. CountBy like <attribute>
()
.<attribute>
Contains ()
. FINDALL ()
. Findonelike ()
. Findlike ()
. Contains ()
. Join ()
. Select ()
. Findorcreateeach ()
. Join ()
. StartsWith ()
. EndsWith ()
Other:
A
Different database connections can be configured in different model to facilitate multi-database support
For example, the user table used in the login, can be placed in Redis, allowing users to log in faster
Business details can be put into mongodb inside faster query
Other relational logic data can be put into RDS libraries such as MySQL
Pre-set in connections file before use.
But I also found a little bug when I used Sails-redis, but I fixed it.
There are questions about Redis that can be directly posted to solve
B
For cross-domain project socket IO JS needs to manually modify the Socket.io file in the frame otherwise the domain name error will occur
Assets Socket IO has a layer of dependencies folder outside
If it's an old project upgrade, note the socket IO JS path problem for cross-domain products
C
Initialize the execution part of the function:
In this case, the model object may have an error that does not exist and can be circumvented by the manual settimeout () method
Of course, some controller methods have to do with their objects on one side of the existence check
PS: That's the worst thing about it. There is no better solution, I think it should be handled by 0.10.x feature 2, the post will be posted after processing method)
D
Database configuration all migrated to connections.js this file, convenient multi-model multi-database call
Sails Js Upgrade Revision