Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default async () => {
// Configure default storage
const localDriver = new LocalDriver({
directory: __dirname + "/../../storage",
createDatePrefix: false,
publicUrl: "http://localhost:9000/storage/"
});
api.configure({
database: { connection },
entity: {
// Instantiate driver with DB connection
driver: new MySQLDriver({ connection }),
// Configure entity attributes
attributes: ({
/* passwordAttribute,
identityAttribute,
bufferAttribute,*/
fileAttributes,
imageAttributes
}) => {
/* identityAttribute();
passwordAttribute();
bufferAttribute();*/
fileAttributes({
require("babel-register");
const config = require("./configs");
const { api } = require("webiny-api");
const { default: myApp } = require("./myApp");
const { app: cmsApp } = require("webiny-api-cms");
api.configure(config())
.use(myApp())
.use(cmsApp())
.install();
import config from "./configs";
import { api } from "webiny-api";
import { app as cmsApp } from "webiny-api-cms";
import myApp from "./myApp";
api.configure(config())
.use(cmsApp())
.use(myApp());
export default api;