I am trying to understand the differences between the 1.0x releases especially as some basic elements are concerned.
I understood that a new concept of services (Services Documentation) was introduced to group functions and dependencies, however, I cannot find examples in documentation with more than one function.
Multiple Function Example Needed
For example, while in 0.5 I could specify a directory to group my functions and already pre-wire all the project files with the details upon creation by using the CLI like so:
serverless function create functions/functionOne
This would ask me a few questions and wire up the config files. Done.
In 1.0
Using a template, it will only create one function, then, everything else has to wired manually?
Is there a way where I can change the yml and have serverless generate the missing functions as stubs?
E.g. if I used this:
functions: hello: handler: handler.hello events: - http: path: users/hello method: get world: handler: handler.world space: handler: space.time
Alternatively, could serverless expand the create command and add creation of functions back, the command would expand the yml as needed? Also be able to place functions into subdirectories for organization would be helpful (or it this delegated to “service” organization)
Where has the project definition gone
In 0.5
The creation of a project also created the package.json for node with the assumption that you operated outside the project directory and had serverless create the overall project.
In 1.0
The package.json is gone. The assumption is that you operate inside the target project directory. You have to, in addition,“serverless create
” also run “npm init
” inside the target project directory.
Could this be simplified?
There are probably more elements where people noticed quirks so additional observations would be helpful to understand.