Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Latest commit

 

History

History
96 lines (76 loc) · 3.72 KB

README.md

File metadata and controls

96 lines (76 loc) · 3.72 KB

IMPORTANT NOTE

CPG is now in one repo, go to https://github.com/Tolfix/cpg

Typescript Typings Docker Image CodeQL Build Version

⭐ | CPG-API

CPG-API is being used to generate items, create invoices, handle orders, view transactions, and ensure payments make it to the client to develop your business. It offers many approaches for developers to personalize CPG

📝| Table of content

📋 | Documentation

You can read our documentation on our wiki.

📦 | Setup

Setting up CPG can be done in various ways, but by far the simplest is by using Docker.

You can pull the latest Docker Image from tolfixorg/cpg:latest from DockerHub.

CPG also needs environment variables added, which you can find in .env.example, those that have (optional) in the comment can be ignored if you don't feel the need for them, but the others are required to make CPG functional.

🔧 | Installing

CPG requires the following

  • Node.js v14 or v16
  • Typescript - 4.3.5
  • MongoDB
  • Git
  1. Clone repository
git clone https://github.com/Tolfix/CPG-API
  1. Install dependencies
npm install
  1. Install TypeScript
npm install -g [email protected]

👷 | Building

CPG is built from TypeScript, so you can run it by using the compiler.

tsc -b
npm run build

👟 | Running

You can run CPG by executing npm run start or node ./build/Main.js. I Would recommend you use pm2.

🎨 | Plugins

Plugins allow you to add others features to CPG. Beware, it can be dangerous as plugins get access to a lot of low level features. You can trust Tolfix plugins, or plugins you created yourself, otherwise there is no guarantee on stability or security. If you want to create your own plugin, check out cpg-plugin-template to create you're own!

Installing

You can add new plugins by modifying the environment variable "PLUGIN" as an array of strings. PLUGINS=["cpg-plugin-discord-webhook", "cpg-plugin-"] This will install the plugin via npm.

Deleting

To delete a plugin, simply remove it from the environment variable "PLUGIN" as an array of strings. PLUGINS=[] This will uninstall the plugin via npm.

📢 | Contribute

Want to contribute? Great! You can contribute to the repository by forking, then make a pull request when you're done!

Or you can ask on our discord server.

🔮 | Discord

Discord

⚙ | Tolfix

Tolfix is a company focused on IT, Development and Networking, we strive to help others with their IT issues and love contributing to other peoples projects! If you'd like to find out more, you can visit us at https://tolfix.com/.