title: Serverless NodeJS File/Folder Structure
body: <p>I'm setting up my first project using <a href="https://serverless.com" rel="nofollow noreferrer">serverless</a> and while I'm finding a lot of great "getting started" tutorials, I'm having a hard time finding anything about actual project structure.</p>
  
  <p>My thoughts is to use the below structure for my functions, shared libs and core configuration/dependencies:</p>
  
  <pre><code>.
  ├── functions/
  │   │
  │   ├── users/
  │   │   ├── handler.js
  │   │   └── serverless.yml
  │   │
  │   └── roles/
  │       ├── handler.js
  │       └── serverless.yml
  │
  ├── shared/
  │   └── common.js
  │   
  ├── node_modules/
  └── package.json
  </code></pre>
  
  <p>My main curiosity is around deployment and how that pertains to dependencies and shared files. Additionally, automating deploy of this structure seems strange as I'm gathering I would need to deploy each of the functions separately which I can script, but wondering if that's needed or advised.</p>