Skip to content

owujib/express-squelize-boilerplate

Repository files navigation

This template will be updated momentarily,

The things I was to solve with is to help me start my project faster This update solves the following:

  1. The issue with rewriting codes for file upload (Done examples can be seen in my test controller and kernel file example 1 and example 2)
  2. Email sending (Done)
  3. Schedulers(work in progress)
  4. Queues (after schedulers)

Wish me the best 😊

use case of file upload helper in route function

this.app.get('/', (req, res) => res.status(200).json({ message: 'Hello' }));

this.app.post(
  '/upload',
  uploadHelper({
    fields: [{ name: 'image', maxCount: 1 }],
    validationFunction: Helper.requestFileValidation(['image/jpeg', 'image/png']),
    limit: null,
  }),
  (req, res) => res.status(200).json({ files: req.files?.image[0], file: req.file })
);

Todos

work on file handlers, get file url for local and cloudinary or s3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published