contentcraft/addon-scripts/1.js

21 lines
742 B
JavaScript
Raw Normal View History

2024-10-13 11:30:51 -05:00
const mainHTML = global.marked.parse(`# Welcome to ContentCraft!
2024-10-13 10:52:27 -05:00
ContentCraft is similar to WordPress, except different.
2024-10-13 11:31:37 -05:00
You can do pretty much anything with it using the "addon-scripts" folder
2024-10-13 10:52:27 -05:00
(like this page here, and making other pages!)
We included a few basic libraries in the index.js for you, but feel free to
2024-10-13 11:31:37 -05:00
add more libraries into your addons, such as "quick.db" if you need to spin up a database.
2024-10-13 10:52:27 -05:00
Have a great day.
2024-10-13 11:30:51 -05:00
From all of us at Sneed Group.
2024-10-13 11:33:05 -05:00
PS: PRO TIP - USE "global" WHEN YOU WANT TO USE VARIABLES CROSS-ADDON.
2024-10-13 11:36:06 -05:00
Example - \`const {QuickDB} = require("quick.db")
global.db = new QuickDB()\``)
2024-10-13 10:52:27 -05:00
2024-10-13 11:30:51 -05:00
global.app.get('/', (req, res) => {
2024-10-13 10:52:27 -05:00
res.send(mainHTML);
});