Skip to content

Prometheus-X-association/contract-manager

Repository files navigation

contract-manager

Prerequisites

Before you begin, ensure you have met the following requirements:

Setup

  1. Make sure to fill your .env (see .env.sample):
cat .env.sample
  1. Use the required Node.js version using nvm:
nvm use

On Windows, you can use the following command:

nvm use $(Get-Content .nvmrc)

This ensures that the project uses the specified Node.js version.

  1. Install project dependencies using pnpm:
pnpm install

This will install all the necessary dependencies for your project.

Usage for development

  1. Watch for changes and automatically restart the server in development:
pnpm dev

This command will use nodemon to watch for changes and restart your application when changes are detected.

Generators

  1. Generate TypeScript types for Mongoose using mongoose-tsgen:
pnpm gen-types

This command will generate TypeScript types based on your Mongoose models.

  1. Generate Swagger API doc with:
pnpm gen-swagger

This command will generate Swagger documentation, accessible at http://localhost:{port}/api-docs/#/

  1. Generate Source Code documentation with:
pnpm gen-docs

This command will generate documentation using TypeDoc for the source code and save it in a "docs" folder.

Building the project for production

  1. Build the project:
pnpm build

This command will clean the build/ directory and compile your TypeScript code.

  1. Start your Node.js application:
pnpm start

This command will start your application using the compiled code.

Tests

  1. Run tests:
pnpm test

This command will run your tests using Mocha. Make sure your tests are located in ./src/tests/*.test.ts.

License

This project is licensed under MIT License

  • see the [LICENSE.md] file for details.

About

Prometheus-X Contract Manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •