mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 11:15:12 +00:00
17 lines
363 B
JavaScript
Executable File
17 lines
363 B
JavaScript
Executable File
const { FileService } = require("m3o/file");
|
|
|
|
// Save a file
|
|
async function saveFile() {
|
|
let fileService = new FileService(process.env.MICRO_API_TOKEN);
|
|
let rsp = await fileService.save({
|
|
file: {
|
|
content: "file content example",
|
|
path: "/document/text-files/file.txt",
|
|
project: "examples",
|
|
},
|
|
});
|
|
console.log(rsp);
|
|
}
|
|
|
|
saveFile();
|