CPG is now in one repo, go to https://github.com/Tolfix/cpg
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
You can read our documentation on our wiki.
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.
CPG requires the following
- Node.js v14 or v16
- Typescript - 4.3.5
- MongoDB
- Git
- Clone repository
git clone https://github.com/Tolfix/CPG-API
- Install dependencies
npm install
- Install
TypeScript
npm install -g typescript@4.3.5
CPG is built from TypeScript, so you can run it by using the compiler.
tsc -b
npm run build
You can run CPG by executing npm run start
or node ./build/Main.js
.
I Would recommend you use pm2
.
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!
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
.
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
.
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
.
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/
.