I want to create an api gateway with express-gateway (https://www.express-gateway.io/). I have a service as "datastore"
and datastore host: mydatastore.us-west-2.compute.amazonaws.com
I want to create a gateway for : mydatastore.us-west-2.compute.amazonaws.com/datastore
So my gateway.config.yml file like that
http:
port: 8080
admin:
port: 9876
host: localhost
apiEndpoints:
datastore:
host: mydatastore.us.us-west-2.compute.amazonaws.com
methods : [ 'POST', 'GET' ]
paths: ['/' ,'/datastore']
serviceEndpoints:
datastoresrv:
url: 'http://mydatastore.us.us-west-2.compute.amazonaws.com/'
policies:
- basic-auth
- cors
- expression
- key-auth
- log
- oauth2
- proxy
- rate-limit
pipelines:
user:
apiEndpoints:
- datastore
policies:
- proxy:
- action:
serviceEndpoint: datastoresrv
changeOrigin: true
but when I send a request to localhost:8080/ or localhost:8080/datastore I getting 404 status code and message : "Cannot GET /" or "Cannot GET /datastore/"
So how can I solve this error. Please help.