Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async run() {
const input = this.parse(RuntimeStartCommand);
const port = input.flags.port || DEFAULT_PORT;
// Configure Slicknode runtime
const runtime = new SlicknodeRuntime({
...(input.flags.secret ? {secret: input.flags.secret} : {}),
});
// Register modules in runtime
const projectRoot = this.getProjectRoot();
const modules = await getModuleList(projectRoot);
modules
.filter((module) => module.config.runtime)
.forEach((module) => {
runtime.register(module.config.module.id, module.path);
});
// Create express app
const app = express.default();
app.use(bodyParser.raw({
type: 'application/json',