1.0.4 • Published 2 years ago
@haulmont/jmix-server-mock v1.0.4
Usage
Command Line
npx @haulmont/jmix-server-mock
By default, it will use schema.graphql
and start server at port 4000 http://localhost:4000/graphql
Customize schema path and port using corresponding options
npx @haulmont/jmix-server-mock --schema path/to/schema.graphql --port 8081
From Code
require('@haulmont/jmix-server-mock').createServer(schemaPath)
.then(({expressApp, apolloServer}) => {
expressApp.listen({port});
console.log(`Server ready at http://localhost:${port}${apolloServer.graphqlPath}`);
})
Usage in Jmix Frontend
Make sure @haulmont/react-scripts
is used
"devDependencies": {
...
"@haulmont/react-scripts": "^4.0.2-alpha.7",
...
}
Specify the following env variable
JMIX_SERVER_MOCK_GRAPHQL=path/to/schema.graphql
The mock server endpoints are available at the same port as dev server (e.g. http://localhost:3000/oauth/token)
proxy
configuration won't work once mock server is enabled
3.0.1-next.0
2 years ago
1.0.4
2 years ago
3.2.0-next.1
2 years ago
3.2.0-next.0
2 years ago
2.0.0-next.6
2 years ago
2.0.0-next.5
2 years ago
2.0.0-next.4
2 years ago
1.0.3
2 years ago
2.0.0-next.2
2 years ago
2.0.0-next.3
2 years ago
2.0.0-next.1
3 years ago
2.0.0-next.0
3 years ago
1.0.2-next.0
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.1-next.0
3 years ago
1.0.0
3 years ago
1.0.0-next.21
3 years ago
1.0.0-next.20
3 years ago
1.0.0-next.1
3 years ago
1.0.0-next.0
3 years ago