matteofigus on master
0.48.18 changelog (compare)
matteofigus on master
0.48.18 changelog (compare)
matteofigus on v0.48.18
matteofigus on v0.48.18
matteofigus on master
Add support for custom keepAliv… Merge pull request #1184 from d… (compare)
matteofigus on master
Add support for custom keepAliv… Merge pull request #1184 from d… (compare)
@kmcrawford wow thank you! I'm trying to do something like that in NodeJS and express.js router, so far can't get through access denied message.
My initial idea was to do following:
const AWS = require('aws-sdk')
const s3 = new AWS.S3()
AWS.config.update({accessKeyId: 'id', secretAccessKey: 'key'})
const myBucket = 'bucket-name'
const signedUrlExpireSeconds = 60 * 5 <-- just a test
const url = s3.getSignedUrl('getObject', {
Bucket: myBucket,
Key: "/",
Expires: signedUrlExpireSeconds
})
console.log(url)
And then pass it to the client = to have something like that:const client = new Client({
registries: {
serverRendering: pre-signed url here <---
},
})
maybe I'm on the wrong track, will see
POST https://oc-registry.com -H "Accept: application/vnd.oc.info+json"
{
components: [{
name: 'component1',
version: '1.X.X'
}, {
name: 'component2',
version: '~1.2.4'
}]
}
oc dev ../components 3000
and put my test component in the components
dir.oc registry add http://localhost:3000
i get this error:not a valid oc registry
GET / 200 0.514 ms - 160
Hello I am trying to understand how Registry Rest API works . Tried to follow the documentation at https://github.com/opencomponents/oc/wiki/Registry . I am bit puzzled about how the registry will work if I want to host the registry in a AWS ECS (EC2) instance.
@shinup after deploying the registry, you should have a base url you can use with the CLI. An easy way to get started with AWS is to use docker for the registry and use Elastic Beanstalk - an example of a container https://github.com/ciricihq/oc-docker
2021-03-15T20:23:45.713168+00:00 app[web.1]: > opencomponents-starter-kit@1.0.0 start /app
2021-03-15T20:23:45.713169+00:00 app[web.1]: > node server.js
2021-03-15T20:23:45.713169+00:00 app[web.1]:
2021-03-15T20:23:49.694652+00:00 app[web.1]: Registry not started: components_list_save
2021-03-15T20:23:49.842166+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-03-15T20:23:49.844844+00:00 app[web.1]: npm ERR! errno 1
2021-03-15T20:23:49.887172+00:00 app[web.1]: npm ERR! opencomponents-starter-kit@1.0.0 start:
node server.js`
{}
for context.plugins
on the server even though i'm following the Wiki line by line on how to register them.. Is there a common mistake or something else I should know outside of the Register#plugins section of the wiki? @matteofigus 🙏
Error: EACCES: permission denied, mkdir '/srv/app/temp' at Object.mkdirSync (fs.js:921:3)
. I haven't been able to find where in the code mkdir is called (and why), does anyone have an idea? For more context, we are calling 127.0.0.1:8080/v2 (where /v2 is the prefix that we passed in the registry options, and 8080 the port in the options) in order to get the list of components
@matteofigus thanks for your quick response. I see the oc.json, I'll remove from there if needed then :+1:
I tried the wrapper approach, not sure if understand correclty. I created a file graphql.js under /plugins/mocks and registered the plugin withoc mock plugin graphql plugins/mocks/graphql.js
. registered succesfully, but when executing the query const response = await context.plugins.graphql.execute.query({ query });
then Im getting this error TypeError: Cannot read property 'query' of undefined
.
the file looks like this:
`
const graphqlPlugin = require('oc-graphql-client');
// module.exports.register = () => graphqlPlugin.register;
module.exports.register = (_opts, _dependencies, next = () => {}) => {
// next function?
graphqlPlugin.register({ serverUrl: 'https://graphql.bitquery.io/ide/SKHzG7zMJS'}, [], next)
return next();
};
module.exports.execute = () => graphqlPlugin.execute();
`