The app is developed by Midway. For more configuration, please refer to Midway.
script location sql/init.sql
The configuration file is located in src/config/config.{current env}.ts
For example, the configuration file name is config.local.ts
in development and config.prod.ts
in deploy.
export const mongoose = {
client: {
uri: 'mongodb uri',
options: {
useNewUrlParser: true,
useUnifiedTopology: true,
user: 'mongodb user',
pass: 'mongodb password',
},
},
};
export const orm = {
type: 'mysql',
host: 'localhost',
port: 3306,
username: 'mysql user',
password: 'mysql password',
database: 'mysql database',
synchronize: false,
logging: true, // print sql
};
export const zCloak = {
// worker
worker: {
// number of worker verify pass
verifyPassNumber: 2,
},
// chain contract
scan: {
// contract config
contractConfigs: [
{
// chain to contract address mapping
chainId: 1287,
contract: {
// contract address
'ProofStorage': '',
'SimpleAggregator': '',
'ZcloakPoap': '',
},
},
],
},
};
$ npm i
$ npm run dev
$ open http://localhost:7001/
$ npm start
$ curl https://zkid-service.zcloak.network/
$ npm stop
- Use
npm run lint
to check code style. - Use
npm test
to run unit test.