0.7.33 • Published 3 years ago
@luics/typeorm-server v0.7.33
Typeorm-Server
Inspired by json-server.
Install
global install
npm i -g ts-node @luics/typeorm-server
local install
npm i -D ts-node @luics/typeorm-server
Cli use
global
typeorm-server --config "typeorm-server.json"
npm script
npx typeorm-server --config "typeorm-server.json"
typeorm-server.json
sample:
{
"typeorm": {
"host": "localhost",
"port": 3306,
"username": "test",
"password": "test",
"database": "test",
"synchronize": false,
"logging": false,
"entities": ["path/to/entity/*.entity.{ts,js}"]
},
"schema": "path/to/entity/schema.json"
}
full doc see TypeormServerConfig
Programmatic use
const app = express();
app.use(express.text({ type: '*/*' }));
app.use(cors({ origin: true, credentials: true }));
app.get('/', (_req, res) => res.json({}));
await useTypeormServerRoutersAsync(app, config, prefix);
0.7.33
3 years ago
0.7.19
3 years ago
0.7.16
3 years ago
0.7.22
3 years ago
0.7.21
3 years ago
0.7.24
3 years ago
0.7.23
3 years ago
0.7.20
3 years ago
0.7.29
3 years ago
0.7.26
3 years ago
0.7.25
3 years ago
0.7.28
3 years ago
0.7.27
3 years ago
0.7.15
3 years ago
0.7.13
3 years ago
0.7.12
3 years ago
0.7.11
3 years ago
0.7.10
3 years ago
0.7.9
3 years ago
0.7.8
3 years ago
0.7.7
3 years ago
0.7.6
3 years ago
0.7.5
3 years ago
0.7.4
3 years ago
0.7.3
3 years ago
0.7.2
3 years ago
0.7.1
3 years ago
0.7.0
3 years ago