mirror of
https://github.com/SrIzan10/makesweet-api.git
synced 2026-05-01 10:55:14 +00:00
add a webroot
This commit is contained in:
7
index.js
7
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);
|
||||
|
||||
2
public/index.html
Normal file
2
public/index.html
Normal file
@@ -0,0 +1,2 @@
|
||||
Hello! This is the makesweet api. Welcome.
|
||||
|
||||
Reference in New Issue
Block a user