Organizing Serverless Projects

#1

Link to chapter - https://serverless-stack.com/chapters/organizing-serverless-projects.html

#2

Great chapter. I could really use examples of a monorepo.

What are best practices if mulitiple services use the same dynamodo or Cognito setup.

How do you deploy multiple services with the same domain? Example - api.example.com?

I feel a chapter on this would be amazing. People are using monorepos but there are not examples outside of claiming you put severless.yml in different folders.

1 Like
#3

Thats a great point. Thanks for feedback. I’m going to write a couple of chapters on these very shortly. But here is the general idea:

1 Like
Configure DynamoDB in Serverless
#4

Thank you so much @jayair this is a good start. Look forward to seeing the chapters. This guide has been indispensable and one of the best technology books/tutorials I have seen in my long career doing web development.

2 Likes
#5

Thank you! I’m glad you’ve found it helpful!

#6

The package.json (and the node_modules/ dir) are at the root of the repo. However, it is fairly common to have a separate package.json inside each service directory.

I think it would be interesting to expand on that a bit. The example provided is great but does not illustrate how to handle dependencies, and shared code between services which is a fairly common issue