Saving cg definitions and modules to the cg directory!!
This commit is contained in:
parent
d606a83dbd
commit
cea41c8247
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ export default defineConfig({
|
||||||
req.on('end', () => {
|
req.on('end', () => {
|
||||||
try {
|
try {
|
||||||
const { filename, content } = JSON.parse(body);
|
const { filename, content } = JSON.parse(body);
|
||||||
const filePath = path.join(__dirname, 'src/cg2', filename + '.cg');
|
const filePath = path.join(__dirname, 'src/cg', filename + '.cg');
|
||||||
fs.writeFileSync(filePath, content);
|
fs.writeFileSync(filePath, content);
|
||||||
res.statusCode = 200;
|
res.statusCode = 200;
|
||||||
res.end(JSON.stringify({ ok: true }));
|
res.end(JSON.stringify({ ok: true }));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue