Skip to content

minhthinhls/Egg-App-Boilerplate

Repository files navigation

EGG.JS FRAMEWORK


Tomato Work Personal Affairs Management System

WEB Applets

Stars Badge

Built with

MySQL Setup

Simple MySQL install and config

# Install mysql
sudo apt install mysql-server
systemctl status mysql.service

# Adjusting User Authentication 
sudo mysql
mysql > SELECT user,authentication_string,plugin,host FROM mysql.user;
mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

# Create a database for tomato_worker
mysql > CREATE DATABASE IF NOT EXISTS sales_db;
mysql > CREATE DATABASE sales_db;

# Later you can login to mysql via
mysql -u root -p

Build Setup

# Download
> git clone --depth=1 https://github.com/minhthinhls/Egg-App-Boilerplate.git

# Install
> npm install

# Generate Typescript on 'app/extend/types/(Controller|Service|Model).d.ts'
> npm run build

# Locking all files declared on 'app/utils/file/read-only/index.ts' to Read-Only Mode.
> npm run lock

# Dev-Mode & Hot-Reload & Port: 7003
> npm run dev

# Build Production & Start
> npm run compile
> npm run start

Register Login User

Using Postman

URL: http://localhost:7003/api/user/register

BODY:

{
    "loginName": "test",
    "userName": "Test",
    "password": "123456",
    "role": 1
}

License

MIT

About

Egg Framework Boilerplate for NodeJS Runtime.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published