Thanks to visit codestin.com
Credit goes to github.com

Skip to content

capire/xtravels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@capire/xtravels

A travel booking application using master data provided by capire/xflights.

Get it

git clone https://github.com/capire/xtravels
cd xtravels
npm install

The package has dependencies to other @capire packages, including @capire/xflights-data, that can be pulled from GitHub Packages or from a local workspace setup as follows...

Using GitHub Packages

Reuse packages among the capire samples are published to the GitHub Packages registry, which requires you to npm login once like that:

npm login --scope=@capire --registry=https://npm.pkg.github.com

When prompted for a password enter a Personal Access Token (classic) with read:packages scope. Learn more about that in Authenticating to GitHub Packages.

A successfull npm login adds entries like that to your local ~/.npmrc file, which allow you to npm install @capire packages subsequently using npm add or npm install as usual:

@capire:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=<generated token>

Using Workspaces

Alternatively you can work with related packages in local workspace setups like so:

  1. Create a workspace root, e.g. at cap/samples:

    mkdir -p cap/samples && cd cap/samples
    echo '{"workspaces":["*","*/apis/*"]}' > package.json
  2. Add related projects:

    git clone https://github.com/capire/xtravels
    git clone https://github.com/capire/xflights
    git clone https://github.com/capire/common
  3. Install dependencies:

    npm install

This will install all dependencies of all cloned projects, with cross dependencies between them being symlinked automatically by npm install. We can inspect this using npm list:

npm ls @capire/xflights-data

... which should display something like this:

samples@ ~/cap/samples
├── @capire/[email protected] -> ./xflights/apis/data-service
└─┬ @capire/[email protected] -> ./xtravels
  └── @capire/[email protected] deduped -> ./xflights/apis/data-service

Run it

cds watch

Which should print something like that:

...
[cds] - server listening on { url: 'http://localhost:4004' }
[cds] - server v9.4.0 launched in 444 ms
[cds] - [ terminate with ^C ]

Cmd-click the http://localhost:4004 link in the terminal to open the app in a browser.

License

Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

About

Travel booking app using master data from xflights

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •