mysql+nestjs+typeorm+mysql+angular 小项目自用,socket实时互动
-
微信端
git clone https://github.com/meepobrother/meepo-hunli.git
yarn
yarn start
- 服务器
cd service && yarn && yarn start
// 数据库配置
import { createConnection } from 'typeorm';
export const databaseProviders = [
{
provide: 'DbConnectionToken',
useFactory: async () => await createConnection({
type: 'mysql',
host: 'mysql host', // 地址
port: 3306,// 端口号
username: 'username',// 用户名
password: 'password',// 密码
database: 'some data base',// 数据库
entities: [
__dirname + '/../**/*.entity{.ts,.js}',
],
}),
},
];
import { BASE_SRC } from './lazyload-background/lazyload-background';
@NgModule({
providers: [
{
provide: APP_BASE_HREF,
useValue: './'
},
{
provide: BASE_SRC,
useValue: '../addons/meepo_hunli/template/mobile/' // 图片服务器地址
}
]
})
export class AppModule { }