create-duffel-app
Work in progress!
TODO:
A scaffolding script to bootstrap a fullstack duffel app
The script will guide you through setting up a minimal fullstack application with Duffel API. At the end of the script, you will have:
- A ready-to-go client and server that can talk to each other locally
- A Duffel API SDK installed and configured with the provided access token
- A code example demonstrating how to make a simple flight search using the Duffel API SDK
Boilerplate source:
Getting started
Get the right NodeJS version
If you use nvm
, run nvm use
. If you use asdf
, run asdf install
.
Install Yarn
Like all Duffel front-ends, this project uses yarn
. If you don't already have it, nstall it globally with npm install --global yarn
.
Start developing
yarn dev
This will start a typescript watcher that will regenerate index.js
. The scaffold can be run by running node index.js
or by linking the package with yarn, just like the following section.
Testing the scaffolded app
Scaffold the sample app by running
yarn build && yarn link
chmod +x .yarn/bin/create-duffel-app
yarn create duffel-app
This will create an app with two folders: client
and server
yarn start:dev
yarn start
Publishing
TBD