1.1.0 • Published 1 year ago

skynet-15 v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

SKYNET-15

Custom Build Tool for Express-PG-Sequelize-React Projects

  • Express.js boilerplate with middlewares

  • Sequelize models generation by schema file

  • React-redux automatic setup

USAGE

Download package

npm install -D skynet-15

Build express server boilerplate

npx skynet init "2"

IMPORTANT NOTE: Do not npm init before initializing skynet-15. Remove package.json

Modify schema.js file for sequelize modeling

Modify template as necessary. If need more models, copy and add more into the exported object. If need less, remove the unused template.

module.exports = {
    table1: {
        model_name: 'User',
        attributes: {
            email: 'string',
            password: 'string',
            role: 'string',
            age: 'integer'
        }
    },

    table2: {
        model_name: 'Content',
        attributes: {
            email: 'string',
            password: 'string',
            role: 'string',
            age: 'integer'
        }
    }
}

Build Sequelize Models

npx skynet build-model

Modify sequelize files according to necessity:

  • Config File

  • Models

  • Migrations

Build Database

npx skynet build-db

For React Client

Initialize React Project

npm create vite@latest

Download package inside client directory

npm install -D skynet-15

Build React-Redux Boilerplate

npx skynet build-client