diff --git a/index.js b/index.js index 5cd0498..4137184 100644 --- a/index.js +++ b/index.js @@ -15,14 +15,9 @@ const workDir = '/tmp/makesweet-api' const upload = multer({ dest: workDir }) const app = express() -app.get('/', (req, res) => { - res.send('Hello World!') -}) +app.use(express.static('public')); app.post('/make/:template', upload.any('images'), handleErrors, (req, res) => { -// if (!req.files) { -// throw new ApiError(400, 'i hunger for images...'); -// } const textHtml = `${process.cwd()}/text.html`; const output = `${workDir}/${uuid.v4()}.gif`; const template = getTemplatePathFromName(req.params.template); diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..4f98d2d --- /dev/null +++ b/public/index.html @@ -0,0 +1,2 @@ +Hello! This is the makesweet api. Welcome. +