-
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Kristiqn Tachev edited this page Mar 6, 2021
·
1 revision
The Gapi CLI is a tool to initialize, develop and maintain Gapi applications
To install Gapi CLI:
npm install -g @gapi/cli
Generating and serving an Gapi project via a development server Create and run a new project:
gapi new my-project
cd my-project
gapi start
Navigate to http://localhost:9000/graphiql. The app will automatically reload if you change any of the source files.
gapi test
Tests will execute after starting application and executed via Jest, and it will automatically watch your files for changes. You can run tests a single time via "gapi test".
gapi test --watch
You can extend configurations from APP when you write after environment "extends app/my-environment"
config:
app:
local:
API_PORT: 9000
API_CERT: ./cert.key
NODE_ENV: development
AMQP_HOST: 182.10.0.5
AMQP_PORT: 5672
ENDPOINT_TESTING: http://localhost:9000/graphql
TOKEN_TESTING: ''
prod:
API_PORT: 9000
API_CERT: ./cert.key
NODE_ENV: production
AMQP_HOST: 182.10.0.5
AMQP_PORT: 5672
ENDPOINT_TESTING: http://182.10.0.101:9000/graphql
TOKEN_TESTING: ''
my-environment:
API_PORT: 9000
API_CERT: ./cert.key
NODE_ENV: development
AMQP_HOST: 182.10.0.5
AMQP_PORT: 5672
ENDPOINT_TESTING: http://localhost:9000/graphql
TOKEN_TESTING: ''
test:
my-environment: extends app/my-environment
local: extends app/local
prod: extends app/prod
worker:
API_PORT: 9000
API_CERT: ./cert.key
NODE_ENV: production
AMQP_HOST: 182.10.0.5
AMQP_PORT: 5672
ENDPOINT_TESTING: http://182.10.0.101:9000/graphql
TOKEN_TESTING: ''
gapi test --worker
gapi test --prod
gapi test --my-enviroment