@vendure/falcon-vendure-api
v0.2.0
Published
Vendure API provider for Deity Falcon
Downloads
33
Maintainers
Readme
Falcon Vendure API
This is an experimental api provider for DEITY Falcon. The goal is to allow Falcon to be used as a storefront for Vendure.
Supported Versions
This package has been tested against:
- @deity/falcon-server v0.4.0
- @deity/falcon-shop-extension v0.4.6
- @deity/falcon-client v0.4.1
- @vendure/core v0.8.0
Since both DEITY Falcon and Vendure are under active development, expect potential instability if attempting to use newer versions than the above.
Installation
With demo.vendure.io
The simplest way to test out the Falcon Vendure API is to run it against the online Vendure demo at demo.vendure.io. In this way, you don't need to worry about running your own local Vendure server.
npm install @vendure/falcon-vendure-api
Configure the extension: In the
config/default.json
file, replace theapi-magento2
config with this:{ "apis": { "api-vendure": { "package": "@vendure/falcon-vendure-api", "config": { "host": "demo.vendure.io", "port": 443, "apiPath": "shop-api", "protocol": "https" } } }, "extensions": { "shop": { "package": "@deity/falcon-shop-extension", "config": { "api": "api-vendure" } } } }
With a local Vendure server
- Set up a Vendure server by following the getting started guide.
- In the Vendure config, set
authOptions.requireVerification
tofalse
so that customer accounts can be created without the need for the email verification step. - In the Vendure config, set the port to
5000
to avoid conflict with the default Falcon client server. - In your Falcon Server project, install
@vendure/falcon-vendure-api
. - Configure the extension: In the
config/default.json
file, replace theapi-magento2
config with this:{ "apis": { "api-vendure": { "package": "@vendure/falcon-vendure-api", "config": { "host": "localhost", "port": 5000, "apiPath": "shop-api", "protocol": "http" } } }, "extensions": { "shop": { "package": "@deity/falcon-shop-extension", "config": { "api": "api-vendure" } } } }
Development
- Assumes that the main Vendure repo is cloned in a sibling directory, since the codegen.yml file is pointing to the Vendure GraphQL introspection schema in that location.
- Run
yarn start:dev
which will start up:- graphql-code-generator (to auto generate TypeScript types for the Vendure & Falcon schemas) in watch mode.
- tsc (the TypeScript compiler) in watch mode.
Testing
- Start the Falcon client (client is not included in this repo to keep things minimal). To install the client locally, see https://falcon.deity.io/docs/getting-started/installation
- Run
yarn server
to run this server locally. The client should then connect to it when opening it in the browser at http://localhost:3000