SlideShare a Scribd company logo
1 of 10
Build Javascript in private environment
 Current:
– npm
 http://registry.npmjs.org
– bower
 https://bower.herokuapp.com/packages
– Sample
» [{"name":"10digit-geo","url":"git://github.com/10digit/geo.git","hits":4561},{"name":"10digit-
invoices","url":"git://github.com/10digit/invoices.git","hits":3937},{"name":"10digit-legal","url":"git://github.com/10digit/legal.git","hits":3518},{"name":"10digit-
payment","url":"git://github.com/10digit/payment.git","hits":3432}, … … ]
– git
 [url "https://"]
insteadOf = git://
– proxy
 http(s)://yourcompany.com:80
 Case 1: acting as a proxy to public npm registry
– forming local registry
– warming up cache
Step 1.
Registry:
yourvm.com:4873
Request:
bower
Step 2.
bower is not in npm local cache
Request from public registry
Step 3.
bower returns
Put it in local cache
Step 4.
bower returns
npm -> sinopia
$ npm install
 Case 2: serve private registry + cache
– without creating public traffic
– error: npm install packageA, not in cache, fail!
Step 1.
Registry:
yourcompany.com:4873
Request:
bower
Step 2.
Package ‘bower’ is found in npm local
cache
No request from public registry
#proxy: npmjs
Step 3.
bower returns
npm -> sinopia
$ npm install
 Case 3: npm publish to private registry
Step 1.
publishConfig.registry:
yourcompany.com:4873
publish
Current directory
Package.json says project name is
build-tester
Step 2.
No conflict name
Store buidler-tester and its content in local cache
$ npm publish ./
Step 3.
ack
#proxy: npmjs
npm -> sinopia
npm -> sinopia
 What is sinopia
– https://github.com/rlidwka/sinopia
– a private/caching npm repository server.
– have a local npm registry with zero configuration.
bower – private-bower
 Case 1: acting as a proxy to public bower registry
– forming local registry
– warming up cache
Step 1.
Registry:
yourcompany.com:5678
Request:
"requirejs-text”
Step 2.
"requirejs-text”
is not found in private bower registry
request from public registry
Step 3.
"requirejs-text“
Returns, put into registry
Step 6,7,8
6, after seeing the mapping, “requirejs-text”:
git://yourcompany.com:6789/requirejs-text
7, git clone
8, return
$ bower install
private bower registry
public bower registry
…
Step 4.
"requirejs-text“:
"url":"git://github.com/requirejs/text”
Step 5.
git clone (I guess)
“requirejs-text” is in git cache folder
bower – private-bower
 Case 2: serve private registry + cache (git daemon as git server)
– without creating public traffic
– error: bower install packageA
Step 1.
Registry:
yourcompany.com:5678
Request:
"requirejs-text”
Step 2,3,4
2, after seeing the mapping, “requirejs-text”:
git://yourcompany.com:6789/requirejs-text
3, git clone
4, return
$ bower install
private bower registry
"disablePublic": true
bower – private-bower
 Case 3: publish local bower project to private-bower
Step 3.
bower register project1 
git://yourcompany.com:6789/project1
$ npm publish ./Step 2. client side
mkdir project1 & git init & git add *
git commit -m "My initial commit message"
git remote add origin git://yourcompany.com:6789/project1
git push -u origin master
bower register project1 git://yourcompany.com:6789/project1
Step 4
ack
private bower registry
"disablePublic": true
Step 1. server side
mkdir project1
cd project1
git init --bare
 bower
– private-bower, https://github.com/Hacklone/private-bower
 git
– git daemon, http://git-scm.com/book/en/v2/Git-on-the-Server-Git-Daemon
 Light weight, no authentication
 enable/disable receiving git push request: --enable=receive-pack
– git daemon --reuseaddr --verbose --base-path="/scratch/mingtzha/_scscheckout/dev/build/gitRepoCache" --listen=yourcompany.com --
port=6789 --export-all --enable=receive-pack
 Sample from https://bower.herokuapp.com/packages (one more time)
– [{"name":"10digit-geo","url":"git://github.com/10digit/geo.git","hits":4561},{"name":"10digit-
invoices","url":"git://github.com/10digit/invoices.git","hits":3937},{"name":"10digit-
legal","url":"git://github.com/10digit/legal.git","hits":3518},{"name":"10digit-
payment","url":"git://github.com/10digit/payment.git","hits":3432}, … … ]
bower – private-bower
 http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push
 https://github.com/npm/npm/issues/5239 (pictures ...)
 https://github.com/bower/bower/issues/329 (bower is tighly coupled with git)
Source not listed inline

More Related Content

What's hot

HTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC EditionHTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC EditionXavier Mertens
 
Application Logging With The ELK Stack
Application Logging With The ELK StackApplication Logging With The ELK Stack
Application Logging With The ELK Stackbenwaine
 
HTTPS + Let's Encrypt
HTTPS + Let's EncryptHTTPS + Let's Encrypt
HTTPS + Let's EncryptWalter Ebert
 
Building A Poor man’s Fir3Ey3 Mail Scanner
Building A Poor man’s Fir3Ey3 Mail ScannerBuilding A Poor man’s Fir3Ey3 Mail Scanner
Building A Poor man’s Fir3Ey3 Mail ScannerXavier Mertens
 
Application Logging With Logstash
Application Logging With LogstashApplication Logging With Logstash
Application Logging With Logstashbenwaine
 
Zero to Online Cafe in 20 minutes
Zero to Online Cafe in 20 minutes Zero to Online Cafe in 20 minutes
Zero to Online Cafe in 20 minutes Steven Cooper
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsRemy Sharp
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossugclkao
 
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and WebminDevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webminpostrational
 
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014Puppet
 
My First Cluster with MongoDB Atlas
My First Cluster with MongoDB AtlasMy First Cluster with MongoDB Atlas
My First Cluster with MongoDB AtlasJay Gordon
 
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...Outlyer
 
ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4Jim Jagielski
 
The story and tech of Read the Docs
The story and tech of Read the DocsThe story and tech of Read the Docs
The story and tech of Read the Docsericholscher
 
Varnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyVarnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyPeter Keung
 
Manage and Deploy your sites with Drush
Manage and Deploy your sites with DrushManage and Deploy your sites with Drush
Manage and Deploy your sites with DrushAmazee Labs
 

What's hot (20)

HTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC EditionHTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC Edition
 
Application Logging With The ELK Stack
Application Logging With The ELK StackApplication Logging With The ELK Stack
Application Logging With The ELK Stack
 
Analyse Yourself
Analyse YourselfAnalyse Yourself
Analyse Yourself
 
HTTPS + Let's Encrypt
HTTPS + Let's EncryptHTTPS + Let's Encrypt
HTTPS + Let's Encrypt
 
Building A Poor man’s Fir3Ey3 Mail Scanner
Building A Poor man’s Fir3Ey3 Mail ScannerBuilding A Poor man’s Fir3Ey3 Mail Scanner
Building A Poor man’s Fir3Ey3 Mail Scanner
 
CouchDB Day NYC 2017: Full Text Search
CouchDB Day NYC 2017: Full Text SearchCouchDB Day NYC 2017: Full Text Search
CouchDB Day NYC 2017: Full Text Search
 
Application Logging With Logstash
Application Logging With LogstashApplication Logging With Logstash
Application Logging With Logstash
 
Zero to Online Cafe in 20 minutes
Zero to Online Cafe in 20 minutes Zero to Online Cafe in 20 minutes
Zero to Online Cafe in 20 minutes
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
 
CouchDB Day NYC 2017: Core HTTP API
CouchDB Day NYC 2017: Core HTTP APICouchDB Day NYC 2017: Core HTTP API
CouchDB Day NYC 2017: Core HTTP API
 
Websockets at tossug
Websockets at tossugWebsockets at tossug
Websockets at tossug
 
DevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and WebminDevOps tools for everyone - Vagrant, Puppet and Webmin
DevOps tools for everyone - Vagrant, Puppet and Webmin
 
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
Got Logs? Get Answers with Elasticsearch ELK - PuppetConf 2014
 
Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
My First Cluster with MongoDB Atlas
My First Cluster with MongoDB AtlasMy First Cluster with MongoDB Atlas
My First Cluster with MongoDB Atlas
 
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
 
ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4ApacheConNA 2015: What's new in Apache httpd 2.4
ApacheConNA 2015: What's new in Apache httpd 2.4
 
The story and tech of Read the Docs
The story and tech of Read the DocsThe story and tech of Read the Docs
The story and tech of Read the Docs
 
Varnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyVarnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites fly
 
Manage and Deploy your sites with Drush
Manage and Deploy your sites with DrushManage and Deploy your sites with Drush
Manage and Deploy your sites with Drush
 

Similar to Build javascript in private environment

Git Workshop : Git On The Server
Git Workshop : Git On The ServerGit Workshop : Git On The Server
Git Workshop : Git On The ServerWildan Maulana
 
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPGIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPPavel Tyk
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlBecky Todd
 
DWX 2022 - DevSecOps mit GitHub
DWX 2022 - DevSecOps mit GitHubDWX 2022 - DevSecOps mit GitHub
DWX 2022 - DevSecOps mit GitHubMarc Müller
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developersmpvanwinkle
 
Sandboxing WebKitGTK (GUADEC 2019)
Sandboxing WebKitGTK (GUADEC 2019)Sandboxing WebKitGTK (GUADEC 2019)
Sandboxing WebKitGTK (GUADEC 2019)Igalia
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Jian-Hong Pan
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기raccoony
 
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2Yros
 
git-and-bitbucket
git-and-bitbucketgit-and-bitbucket
git-and-bitbucketazwildcat
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflowRiccardo Coppola
 
[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선ethconkr
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Herokuronnywang_tw
 
Magento Fireside Chat: "Wiring Mageno Projects"
Magento Fireside Chat: "Wiring Mageno Projects"Magento Fireside Chat: "Wiring Mageno Projects"
Magento Fireside Chat: "Wiring Mageno Projects"AOE
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)dantleech
 

Similar to Build javascript in private environment (20)

Git Workshop : Git On The Server
Git Workshop : Git On The ServerGit Workshop : Git On The Server
Git Workshop : Git On The Server
 
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPGIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APP
 
SydJS.com
SydJS.comSydJS.com
SydJS.com
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
 
DWX 2022 - DevSecOps mit GitHub
DWX 2022 - DevSecOps mit GitHubDWX 2022 - DevSecOps mit GitHub
DWX 2022 - DevSecOps mit GitHub
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
 
Sandboxing WebKitGTK (GUADEC 2019)
Sandboxing WebKitGTK (GUADEC 2019)Sandboxing WebKitGTK (GUADEC 2019)
Sandboxing WebKitGTK (GUADEC 2019)
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
 
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2Dev ninja  -> vagrant + virtualbox + chef-solo + git + ec2
Dev ninja -> vagrant + virtualbox + chef-solo + git + ec2
 
GitSetupLinux
GitSetupLinuxGitSetupLinux
GitSetupLinux
 
Git setuplinux
Git setuplinuxGit setuplinux
Git setuplinux
 
git-and-bitbucket
git-and-bitbucketgit-and-bitbucket
git-and-bitbucket
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflow
 
Basic git
Basic gitBasic git
Basic git
 
[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선
 
簡單介紹git
簡單介紹git簡單介紹git
簡單介紹git
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 
Magento Fireside Chat: "Wiring Mageno Projects"
Magento Fireside Chat: "Wiring Mageno Projects"Magento Fireside Chat: "Wiring Mageno Projects"
Magento Fireside Chat: "Wiring Mageno Projects"
 
Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)Exploring Async PHP (SF Live Berlin 2019)
Exploring Async PHP (SF Live Berlin 2019)
 

Recently uploaded

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Recently uploaded (20)

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

Build javascript in private environment

  • 1. Build Javascript in private environment  Current: – npm  http://registry.npmjs.org – bower  https://bower.herokuapp.com/packages – Sample » [{"name":"10digit-geo","url":"git://github.com/10digit/geo.git","hits":4561},{"name":"10digit- invoices","url":"git://github.com/10digit/invoices.git","hits":3937},{"name":"10digit-legal","url":"git://github.com/10digit/legal.git","hits":3518},{"name":"10digit- payment","url":"git://github.com/10digit/payment.git","hits":3432}, … … ] – git  [url "https://"] insteadOf = git:// – proxy  http(s)://yourcompany.com:80
  • 2.  Case 1: acting as a proxy to public npm registry – forming local registry – warming up cache Step 1. Registry: yourvm.com:4873 Request: bower Step 2. bower is not in npm local cache Request from public registry Step 3. bower returns Put it in local cache Step 4. bower returns npm -> sinopia $ npm install
  • 3.  Case 2: serve private registry + cache – without creating public traffic – error: npm install packageA, not in cache, fail! Step 1. Registry: yourcompany.com:4873 Request: bower Step 2. Package ‘bower’ is found in npm local cache No request from public registry #proxy: npmjs Step 3. bower returns npm -> sinopia $ npm install
  • 4.  Case 3: npm publish to private registry Step 1. publishConfig.registry: yourcompany.com:4873 publish Current directory Package.json says project name is build-tester Step 2. No conflict name Store buidler-tester and its content in local cache $ npm publish ./ Step 3. ack #proxy: npmjs npm -> sinopia
  • 5. npm -> sinopia  What is sinopia – https://github.com/rlidwka/sinopia – a private/caching npm repository server. – have a local npm registry with zero configuration.
  • 6. bower – private-bower  Case 1: acting as a proxy to public bower registry – forming local registry – warming up cache Step 1. Registry: yourcompany.com:5678 Request: "requirejs-text” Step 2. "requirejs-text” is not found in private bower registry request from public registry Step 3. "requirejs-text“ Returns, put into registry Step 6,7,8 6, after seeing the mapping, “requirejs-text”: git://yourcompany.com:6789/requirejs-text 7, git clone 8, return $ bower install private bower registry public bower registry … Step 4. "requirejs-text“: "url":"git://github.com/requirejs/text” Step 5. git clone (I guess) “requirejs-text” is in git cache folder
  • 7. bower – private-bower  Case 2: serve private registry + cache (git daemon as git server) – without creating public traffic – error: bower install packageA Step 1. Registry: yourcompany.com:5678 Request: "requirejs-text” Step 2,3,4 2, after seeing the mapping, “requirejs-text”: git://yourcompany.com:6789/requirejs-text 3, git clone 4, return $ bower install private bower registry "disablePublic": true
  • 8. bower – private-bower  Case 3: publish local bower project to private-bower Step 3. bower register project1 git://yourcompany.com:6789/project1 $ npm publish ./Step 2. client side mkdir project1 & git init & git add * git commit -m "My initial commit message" git remote add origin git://yourcompany.com:6789/project1 git push -u origin master bower register project1 git://yourcompany.com:6789/project1 Step 4 ack private bower registry "disablePublic": true Step 1. server side mkdir project1 cd project1 git init --bare
  • 9.  bower – private-bower, https://github.com/Hacklone/private-bower  git – git daemon, http://git-scm.com/book/en/v2/Git-on-the-Server-Git-Daemon  Light weight, no authentication  enable/disable receiving git push request: --enable=receive-pack – git daemon --reuseaddr --verbose --base-path="/scratch/mingtzha/_scscheckout/dev/build/gitRepoCache" --listen=yourcompany.com -- port=6789 --export-all --enable=receive-pack  Sample from https://bower.herokuapp.com/packages (one more time) – [{"name":"10digit-geo","url":"git://github.com/10digit/geo.git","hits":4561},{"name":"10digit- invoices","url":"git://github.com/10digit/invoices.git","hits":3937},{"name":"10digit- legal","url":"git://github.com/10digit/legal.git","hits":3518},{"name":"10digit- payment","url":"git://github.com/10digit/payment.git","hits":3432}, … … ] bower – private-bower
  • 10.  http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push  https://github.com/npm/npm/issues/5239 (pictures ...)  https://github.com/bower/bower/issues/329 (bower is tighly coupled with git) Source not listed inline