/begin-oauth-babel-shared-code-poc

This is a PoC for sharing common code in a Begin app.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Begin build status

What is this?

This is a PoC for sharing common code without having to use hydrate. It allows for shared code between routes, (and I think even with tree-shaking?). It's just how my brain organizes code like this, so I thought I'd give it a try.

I added Typescript, Prettier, and a few other things while I was at it. Feedback welcome!

This is based on @brianleroux's OAuth article and example: https://github.com/begin-examples/learn-node-oauth

Some Issues and Caveats

  • If a route imports a common file that has an external dependency, the package.json within that route needs to include it. I haven't figured out a way to make this smarter, (yet).

Deploy your own

Deploy to Begin

Deploy your own clone of this app to Begin!

Getting started

  • Start the local dev server: npm start
  • Lint your code: npm run lint
  • Run your tests: npm t

Reference

  • Quickstart - basics on working locally, project structure, deploying, and accessing your Begin app
  • Creating new routes - basics on expanding the capabilities of your app

Head to docs.begin.com to learn more!