- Node.js:
>=8.4.0
and npm:>=5.3.0
- MySQL|MariaDB:
>=5.7.0
For application config use node-config with toml files
create config/local-development.toml
for development config
# config/local-development.toml
env = "development"
[db]
username = "dbuser"
password = "dbpass"
database = "dbname"
# install dependencies
npm install
# create database table and seed with data
npm run migration
# run development server
npm run dev
# for debugging
npm run dev:inspect
- Open http://127.0.0.1:3000 in browser
- Available application components
Sequelize cli is used to generate migrations and seeder files
- create database:
./node_modules/.bin/sequelize db:create
- Auto generate model and migration file
# Generate Task model
mkdir server/api/task
./node_modules/.bin/sequelize model:generate\
--models-path server/api/task --name Task\
--attributes name:STRING,description:TEXT,startAt:DATE,endAt:DATE,completedAt:DATE
- Run migration:
./node_modules/.bin/sequelize db:migrate
- for more see this
- Nuxt.js - server-side rendering
- Element-UI - ui library
- Sequelize - mysql orm
- Passport.js - authentication library
- node-config - application configuration
- TOML - configuration files