Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

129 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataMapper

Testing handlebars and javascript functionality.

Docker

To run the application using docker run:

docker-compose up -d

Handlebars

Handlebars files go to views directory.

Example on how to access handlebars:

curl --location --request POST 'http://localhost:3000/hbs/my/restful/url/myFile' --data ''

Javascript

NB! js is for historic/backwards-compatibility and due to other Bürokratt services mapping js folder as volumes. Code itself is TypeScript.

Javascript files go to js directory.

Example on how to access javascript files in browser:

http://localhost:3000/js/example/examples

Note! URL must not end with .js extension.

Local Development

To develop the DataMapper, it's recommended to have nvm installed, which will ensure you have the correct node and npm versions.

# Install the required node version
nvm install

# Switch to the required node version
nvm use

# Install node dependencies
npm install

# Development mode (hot reload)
npm run dev

# Production build
npm run build

# Run the compiled app
npm start

Code quality

Formatting

npm run format         # Check if the code is formatted, without making changes
npm run format:fix     # Format the code

Linting

npm run lint           # Check for linting issues, without making changes
npm run lint:fix       # Automatically fix linting issues

Tests

Tests are written in TypeScript (and the project should be migrated to TypeScript in the future too). Available npm scripts:

npm test               # Run tests in watch mode
npm run test:run       # Run tests once
npm run test:coverage  # Run tests with coverage

Continuous Integration

Format, lint, test, and build checks are run on every commit to PRs that are not in Draft status. These checks are configured in this workflow.

About

Re-formatting data structures on the level of configuration files

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages