@concordant/c-service
v1.2.2
Published
Background service for the Concordant platform
Downloads
8
Maintainers
Readme
Private releases
The C-Service, and the C-CRDTlib it depends on, are delivered as NPM packages. Public releases are published on npmjs, while development releases are published to a private Gitlab Packages registry.
To use development releases, set up NPM as described in the c-crdtlib guide
See also the wiki for documentation.
Go to project root directory and run:
npm install
Build
The build is managed by NPM.
Typescript sources (code and tests) are transpiled to JavaScript.
NPM targets (set up as scripts in package.json
) are as follows:
install
: install dependencies and prepare (compile)run prepare
: lifecycle script (→ build)run build
: should be removed (merge with prepare)test
: run jest (tests & coverage);DBNAME
must be set, and will be used as database name for tests.start
: dev server, listens on TCP port 4000run lint
: run eslint
Used software
Dev tools
- tsc: Typescript transpiler (to JavaScript)
- webpack: JavaScript bundler, used to bundle the ServiceWorker
- NPM: package/build manager
- Husky: git hooks manager
- lint-staged: apply pre-commit hooks to changed files only ; runs:
- ESlint: linter (static code analyser)
- Prettier: code formatter
- Jest: JS testing library tool
- Gitlab-CI: gitlab Continuous Integration platform
Libraries
- OpenAPI (aka Swagger): language for RESTful interface description
- Sofa: generate a REST interface from graphQL
- Apollo: graphQL library
- Express: web server
- PouchDB: JavaScript CouchDB implementation & client
- C-CRDTlib: our CRDT library
Files
Build, configuration, metadata
LICENSE
README.md
Doc: userREADME.dev.md
Doc: developer.git/
Config: Git.gitignore
package.json
Config: NPM: metadata, dependencies, scripts, config (lint-staged, Husky)package-lock.json
Actual dependency tree (automatically updated)tsconfig.json
Config: tsc TypeScript compiler:src \ {node_modules, **/__tests__/*} → dist/
.babelrc
Config: Babel compiler (??).eslintrc.js
Config: ESlint.eslintignore
.prettierignore
Config: Prettierjest.config.js
Config: Jest (roots: src/ & test/ ; TS transformer).gitlab-ci.yml
Config: continuous integrationDockerfile
Config: Docker build.dockerignore
Code
swagger.yml
OpenAPI Specification, auto-generated from GraphQLsrc/
Codeschema.ts
GraphQL schema definitionservice.ts
GraphQL resolversc-service-worker.js
Service worker implementationconfig.json
Service Worker configurationdatabase/
storage connectors
test/
Tests (Jest)
Artifacts (untracked)
node_modules/
Dependencies, created & populated bynpm install
dist/
JS files, created & populated bynpm prepare
(tsc)coverage/
Tests coverage, created & populated bynpm test
(jest)