0.1.1 • Published 5 years ago

code-first v0.1.1

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Code First

The purpose of this package is to generate boilerplates for different tech stacks, with the very first tech stack iteration being mysql through sequelize, node, express, react. Eventually we will also build upon this and make it so it can build frontend skeletons using material-ui package automatically based off sequelize models and extra config info.

Getting Started

To use cli:

either use npx e.g.:

npx code-first init

or

install and use via commandline:

npm i -g code-first
code-first init

Useage of CLI:

  • init - should be run on empty repository/folder, creates all the boilerplate files for project.
  • build - run after creating sequelize models

Example project:

  • Start by running bash commands:
mkdir my-project
cd my-project
git init
npx code-first init
npm run sequelize -- model:create --name User --attributes name:string,state:boolean,birth:date,card:integer,role:enum:'{Admin,Guest}'
npm run sequelize -- model:create --name Person --attributes name:string,state:boolean,birth:date,card:integer,role:enum:'{Admin,Guest}'
  • copy into person.js's .associate method
Person.belongsTo(models.User);
  • copy into user.js's .associate method
User.hasMany(models.Person, {
    onCascade: "delete"
});
  • then run the bash command:
npx code-first build
0.1.1-remodel.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.64

5 years ago

0.0.63

5 years ago

0.0.62

5 years ago

0.0.61

5 years ago

0.0.60

5 years ago

0.0.59

5 years ago

0.0.58

5 years ago

0.0.56

5 years ago

0.0.54

5 years ago

0.0.53

5 years ago

0.0.52

5 years ago

0.0.51

5 years ago

0.0.50

5 years ago

0.0.49

5 years ago

0.0.48

5 years ago

0.0.47

5 years ago

0.0.46

5 years ago

0.0.45

5 years ago

0.0.44

5 years ago

0.0.43

5 years ago

0.0.42

5 years ago

0.0.41

5 years ago

0.0.40

5 years ago

0.0.39

5 years ago

0.0.38

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago