1.0.0 • Published 4 years ago

ixl-adapter v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

ixl-adapter

Monorepo adapter

Installation

npm install
npm run bootstrap
npm run build

Starting

B2C Commerce server

  1. Run npm run dev:app:b2c

Omnicron server

  1. Copy .env.example in packages/apps/ixl-omnicron-apollo-server to .env and update with your settings
  2. Run npm run dev:app:omnicron

Publish to npm

npm init --@scope=tuscany
npm publish

Lint testing (ESLint)

npm run test:lint

Format testing (Prettier)

npm run test:format

Test in browser

open a browser and go to the following uri

http://localhost:4002/graphql

and within the browser run this command

query{hello}

Test with curl

If you want to test this service works in curl, run this command

curl 'http://localhost:4002/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://localhost:4002' --data-binary '{"query":"query{hello}# Write your query or mutation here\n"}' --compressed

Folder structure

packages/
  adapters/     - these are the adapters for each platform
  apps/         - these are the ready made apps/configuration
  common/       - common and/or utility like modules
  features/     - experimental feature modules (SAP Commerce only currently - see b2c-commerce app)
  schemas/      - GraphQL schemas
  services/     - services such as database connections, pubsub etc
  tools/        - tools like generators, data load etc

Running on Docker

Build your image: docker build -t ixl-adapter-b2c -f packages/apps/b2c-commerce/Dockerfile .

Run the container: docker run --publish 4002:4002 --detach --name ixl-adapter-b2c ixl-adapter-b2c

Copyright

Licensed Materials - Property of IBM

694906H

© Copyright IBM Corp. 2020 All Rights Reserved

US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.