Vue and Serverless Project Layout

Tags: vuejs serverless package.json

We like to have 2 separate repos:

  • One for the frontend static Vue.js site
  • One for the backend Serverless project that includes AWS Lambda functions, AppSync resolvers, GraphQL schema

That way each project gets its own package.json file for its dependencies.

Frontend Vue.js Project Layout

We start with the project generated by Vue CLI 3.

We follow the patterns it provides, such as:

  • src/views/: For our single-file Vue components that are used as standalone pages.
  • src/components/: For our single-file Vue components that are used inside of pages or other components.

Backend Serverless Project Layout

We start with the project generated by the Serverless AWS Node or Python template. Lately we have been using the Node template a lot more.

serverless create --template aws-nodejs --path my-service
1

Copyright © 2018 Daniel and Audrey Roy Greenfeld.
Site Map

Last Updated: 8/27/2018, 7:00:15 PM