Skip to content

nodeteamdev/express-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-actions

Build a modified version of a actions that proxies its inputs from request parameters, and proxies its exits through the response.

main idea is:

const express = require('express');
const expressActions = require('express-actions');

const app = express();
const port = 3000;

app.use(expressActions({
    app,
    folders: {
        actions: 'actions',
        helpers: 'helpers',
    },
}));

app.listen(port, () => {
    console.log(`Example app listening at http://localhost:${port}`);
});
module.exports = {

    method: 'GET',

    path: '/',

    validations: {},

    handlers: [cors()],

    fn: (req, res, next) => {
        res.send('Hello world!');
    },
};

About

Build a modified version of a actions that proxies its inputs from request parameters, and proxies its exits through the response.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published