File tree Expand file tree Collapse file tree 2 files changed +29
-8
lines changed Expand file tree Collapse file tree 2 files changed +29
-8
lines changed Original file line number Diff line number Diff line change 1
- const http = require ( 'http' )
2
- const bunny = require ( 'sign-bunny' )
3
- http . createServer ( ( req , res ) => {
4
- console . log ( process . env )
5
- res . setHeader ( 'Content-Type' , 'text/plain; charset=utf-8' )
6
- res . end ( bunny ( 'Foo' ) )
7
- } ) . listen ( process . env . PORT || 3000 )
1
+ const oc = require ( 'oc' ) ;
2
+
3
+ const configuration = {
4
+ verbosity : 0 ,
5
+ baseUrl : 'https://opencomponents-site-registry.herokuapp.com/' ,
6
+ port : process . env . PORT || 3000 ,
7
+ tempDir : './temp/' ,
8
+ refreshInterval : 600 ,
9
+ pollingInterval : 5 ,
10
+ s3 : {
11
+ key : process . env . S3KEY ,
12
+ secret : process . env . S3SECRET ,
13
+ bucket : process . env . S3BUCKET ,
14
+ region : process . env . S3REGION ,
15
+ path : `//s3.amazonaws.com/${ process . env . S3BUCKET } /` ,
16
+ componentsDir : 'components'
17
+ } ,
18
+ env : { name : 'production' }
19
+ } ;
20
+
21
+ const registry = new oc . Registry ( configuration ) ;
22
+
23
+ registry . start ( function ( err , app ) {
24
+ if ( err ) {
25
+ console . log ( 'Registry not started: ' , err ) ;
26
+ process . exit ( 1 ) ;
27
+ }
28
+ } ) ;
Original file line number Diff line number Diff line change 11
11
},
12
12
"license" : " MIT" ,
13
13
"dependencies" : {
14
- "sign-bunny " : " ^1.0.0 "
14
+ "oc " : " ^0.39.8 "
15
15
}
16
16
}
You can’t perform that action at this time.
0 commit comments