Skip to content

CodeCoupler API

The CodeCoupler API is a modified Loopback boilerplate with integrated packages like cc-api-auth or dot-env for quick starting a backend.

Get Started

  1. Install:
npm init @codecoupler/cc-api
npm i
  1. Create authentication database from SQL File node_modules/@codecoupler/cc-api-auth/cc-api-auth.sql
  2. Modify database settings in datasources/auth.datasourse.ts
  3. Copy .env.default to .env and modify settings
  4. Change in package.json: name, version, description, author, keywords, homepage, license
  5. Add private: "true" to package.json if not public
  6. Change the tag cc-api to the project name in the scripts docker:build and docker:run

Modifications of the origin Loopback boilerplate

  • Added "files.eol": "\n" to Visual Code Settings
  • Integrated package @codecoupler/cc-api-auth (Prepared Datasource "Auth"; Modified index.ts, application.ts, sequence.ts)
  • Control basepath with .env file
  • Tests modified to respect basepath from .env file
  • Mocha settings modified to read .env file
  • Added --exit flag to mocha in npm scripts
  • New script quicktest added for testing without linting
  • Excluded src from package and included .env.default
  • Package specified as private