.
├── .babelrc # Babel config
├── .eslintrc.js # ESLint config
├── .sequelizerc # Sequelize config
├── CONTRIBUTING.md
├── docs
│ └── ...
├── hooks # Git hooks
│ └── pre-commit
├── LICENSE
├── nodemon.json # Nodemon config
├── package.json
├── package-lock.json
├── README.md
├── sample.env # Sample environment variables file
├── migrations
│ └── <timestamp-name>.js
├── seeders
│ └── <timestamp-name>.js
└── src
├── config
│ └── sequelize.js # Database config
├── constants
│ └── api.js
├── pre_handlers
│ ├── authantication.js
│ ├── complatePath.js
│ └── index.js
│ ├── exceptions
│ │ ├── errorHandler.js
│ │ └── HTTPError.js # Custom HTTP error
├── models
│ ├── index.js
│ └── <modelName>.js
├── services
│ └── <serviceName>.js
├── routes
│ ├── <routeName>
│ │ └── index.js
│ └── index.js
├── joi.js # For Joi multiple error
├── router.js
├── sequelize.js # Database connection
├── server.js # Server start point
└── utils
├── encription.js
├── generateSlug.js
└── sendEmail.js
git clone https://github.com/mavidurak/orientation-api.git
cd orientation-api
Install dependencies
npm install
Copy sample.env file then changes values.
cp sample.env .env
APP_PORT=4000
DATABASE=mavidurak
TEST_DATABASE=mavidurak_test
DATABASE_USERNAME=root
DATABASE_PASSWORD=
DATABASE_HOST=localhost
API_PATH=http://localhost:4000
DASHBOARD_UI_PATH=http://localhost:8080
EMAIL_HOST=
EMAIL_PORT=
EMAIL_SECURE=
EMAIL_USER=
EMAIL_PASSWORD=
Send mail with smtp.gmail. If you use smtp.google, EMAIL_SECURE=
is must be true
,
Send mail with smtp.office365.com. If you use smtp.office365.com, EMAIL_SECURE=
leave blank.
Create database then migrate it
npm run migrate
Insert random data into database
npm run seed
npm start
npm run lint
Build git hooks
npm run build-hooks
npm run build