Angular 2 in the Enterprise:Install Node, NPM & Angular on Windows ( No Admin Rights) + Repository [w/ subs]



00:00:00 – hello everyone how's it going Vasco hear
00:00:03 – from the angular university maybe one of
00:00:06 – the biggest obstacles to angular to an
00:00:08 – option our corporate proxies and even
00:00:11 – getting it to run in your windows
00:00:13 – corporate pc it's really much harder
00:00:17 – than one might think while reading it
00:00:20 – from home for example so the goal of
00:00:22 – this video is to get some tips and
00:00:24 – tricks on how to get this set up in your
00:00:26 – organization and maybe show that
00:00:30 – prototype to your boss that will
00:00:31 – convince them to adopt angular2 in your
00:00:35 – team so let's get started
00:00:38 – this is a quick introduction to the OGS
00:00:40 – ecosystem so to know that an NPM it's
00:00:44 – meant for developers that are just
00:00:46 – arriving maybe at the angular 2
00:00:48 – ecosystem and the they're trying to
00:00:50 – figure out note and p.m. and how to use
00:00:53 – these tools what we're going to do here
00:00:55 – is we're going to go over how to install
00:00:58 – know how to switch easily between node
00:01:01 – versions how to install node without
00:01:03 – administration rights on your pc and
00:01:06 – we're going to see also how to deal with
00:01:08 – corporate proxies and the usual
00:01:11 – obstacles that you will find if you try
00:01:13 – to use node in a new project in a
00:01:15 – company where it has never been used
00:01:17 – before either as a server or as more
00:01:20 – frequently front and built all so the
00:01:23 – first thing to do is to go to the
00:01:25 – website and install know Jas you cannot
00:01:28 – load it here usually in angular 2
00:01:31 – projects we are using node for front-end
00:01:34 – tooling we are not necessarily running
00:01:37 – known as the server although we could
00:01:39 – but there are many projects where note
00:01:41 – is being used as a build tool and as a
00:01:44 – development time to essentially so for
00:01:47 – those cases it's better to download the
00:01:49 – latest version so you want to download
00:01:52 – the latest version of node but easier
00:01:55 – said than then because these might be
00:01:57 – blocked at the level of the installation
00:01:59 – it might need admin rights so you don't
00:02:03 – need admin rights to install node if you
00:02:05 – have over 200 GS not org slash this you
00:02:09 – have here the list of installation
00:02:11 – versions that are available
00:02:13 – and let's say that we want the latest
00:02:15 – version so version 7 dot something we
00:02:20 – have it version 7 not to that
00:02:22 – oh we click into it and we have here a
00:02:25 – series of downloadable executables what
00:02:28 – we can do here is for example we can
00:02:31 – download the Windows version let's say
00:02:33 – that we want to download the version 7
00:02:35 – to the 0 for windows so if we open the
00:02:39 – package that we just download it and we
00:02:42 – can zip it
00:02:43 – we're going to see that the package
00:02:45 – contains and no dot XA so this is a mac
00:02:48 – but in Windows you can put these in any
00:02:50 – folder in your computer and you need to
00:02:53 – add this directory here to your path so
00:02:56 – that once you type know in the command
00:02:59 – line you would have no training in
00:03:01 – windows so you don't need administration
00:03:04 – rights to do this you also have here
00:03:07 – npm and you have npm not CMD so when you
00:03:13 – put this directly on the path if you
00:03:15 – type know the minus V you should get the
00:03:17 – working version of nodes and any PM
00:03:19 – minus V you should get a working version
00:03:22 – of NPM as well because take a look
00:03:25 – npm got CMD means that npm will be
00:03:28 – recognized as a command in the windows
00:03:31 – prompt once you have no they installed
00:03:34 – the next thing that you want to install
00:03:35 – is get even if your project is using
00:03:38 – subversion and will do so for the
00:03:41 – foreseeable future
00:03:42 – it's still great to install kit because
00:03:44 – it comes with the bash shell that does
00:03:47 – not need any administration rights to be
00:03:49 – installed it's called get back so it's a
00:03:52 – terminal like the windows terminal but
00:03:55 – it runs bash so you can use bash both on
00:03:58 – the server and on your computer if you
00:04:00 – want and it's great for interacting with
00:04:02 – get with NPM it's a great thing to have
00:04:05 – in general in your computer so you have
00:04:08 – over to get cash sem and you install get
00:04:12 – your computer you will you will
00:04:14 – eventually need it for other reasons so
00:04:17 – might as well install it and have
00:04:19 – a good Michelle it does not require
00:04:22 – administration rights you have a
00:04:24 – checkbox that says I want Windows
00:04:26 – Explorer integration so with the
00:04:29 – information you can right-click on the
00:04:31 – folder and you can do commit son get
00:04:33 – with it but there were other than that
00:04:35 – to install git bash and get itself if
00:04:38 – you want to check that check box you'll
00:04:40 – be able to install git bash without any
00:04:42 – problem in your Windows PC because those
00:04:45 – options do not require administration
00:04:48 – rights now after having get and no the
00:04:52 – npm install in your computer you should
00:04:55 – have a terminal where you type node
00:04:57 – minus V and you would have some ancient
00:05:00 – version of node maybe because it was
00:05:02 – already installed or it's a fresh
00:05:04 – install that you just downloaded and you
00:05:06 – have the latest version but in a month
00:05:09 – into moves you will need the new note
00:05:12 – version and you don't want to go over
00:05:13 – the process so i would advise you to
00:05:16 – install from the beginning a tool that
00:05:18 – easily allows you to download different
00:05:20 – versions of no this is great if you have
00:05:23 – multiple projects each one depending on
00:05:25 – different versions of node so the tool
00:05:28 – that we can use their a couple of tools
00:05:30 – there is a tool called nvm and there is
00:05:33 – a tool called never so let's have a look
00:05:36 – at them here in the NPS that or we can
00:05:40 – see here that now he has two files on
00:05:42 – downloads in the last day and let's have
00:05:45 – a look at nvm so it has a lot less
00:05:50 – downloads and we can see here it has
00:05:53 – been moved etc so at this moment I would
00:05:57 – advise you to use never have been using
00:05:59 – it for a long time it works great so in
00:06:02 – order to install everything you need to
00:06:03 – do npm install minus G Navy and if you
00:06:08 – are in mac or linux you will have to
00:06:12 – throw in a suit at the beginning and the
00:06:15 – installation should run smoothly it's a
00:06:17 – simple tool if we do have ALS this gives
00:06:21 – us take a look these are all the load
00:06:23 – versions that i have here installed in
00:06:25 – this computer so i have a lot of
00:06:28 – versions so in this case let me see what
00:06:31 – was the latest version of node it's 72
00:06:34 – thought so let's say for example I don't
00:06:36 – have here the latest version of node so
00:06:39 – how do i install it using every i do LS
00:06:42 – remote and here it is it's available so
00:06:47 – you can also install if you need you
00:06:49 – have versions of iOS is this is the for
00:06:52 – conversion before the merge let's then
00:06:54 – use navigate to install the latest
00:06:57 – version of node you simply have to do
00:06:59 – Ave use and then the version of know
00:07:01 – that you need so in this case never use
00:07:03 – 720 it detects that it's not locally
00:07:07 – installed so it's just going to download
00:07:10 – it and here it's going to launch a new
00:07:12 – bash shell so these is executed a new
00:07:16 – shell you can exit from it to go back to
00:07:19 – the previous shell right now if you do
00:07:22 – noth- v you have here the latest version
00:07:25 – of no installed so this is a very
00:07:28 – convenient way for switching between
00:07:31 – node versions so if I now do love ALS I
00:07:34 – can see here that I have seven thought
00:07:37 – to that
00:07:37 – oh ok so this is a good start you have a
00:07:40 – bash shell you have no you have npm but
00:07:44 – typically if you were in a corporate
00:07:47 – environment if you type npm install at
00:07:51 – angular / core you're going to get a
00:07:54 – proxy error so your corporate proxy will
00:07:57 – not allow you to install things from the
00:08:01 – command line
00:08:01 – the first thing that you need to do is
00:08:03 – to head over to your browser and they're
00:08:07 – trying to see if you have access to
00:08:08 – registry that NP MGS dot-org so you
00:08:12 – should try first with https just to make
00:08:16 – sure that you can access it or if you
00:08:19 – can't try with HTTP now your corporate
00:08:23 – proxy might show you a pop-up saying do
00:08:26 – you really want to access this site so
00:08:29 – it's a confirmation pop-up that is
00:08:31 – trying to see if your windows user that
00:08:34 – is being used to log into your corporate
00:08:37 – proxy if you really want to go to that
00:08:40 – side
00:08:40 – you click OK and many times you can
00:08:43 – still watch the site so it's just a
00:08:45 – preventive measure in corporate process
00:08:48 – so if at this point you can access the
00:08:50 – registry one way or the other I your
00:08:53 – browser then we're in business because
00:08:55 – these means that in the last case
00:08:58 – scenario you could always use the
00:09:01 – credentials that your browser is using
00:09:04 – to connect itself to the proxy you could
00:09:06 – use those same credentials typically
00:09:08 – associated to your windows user to
00:09:10 – download your NPM packages as well so if
00:09:15 – you can watch it in the browser you can
00:09:17 – use those credentials to download things
00:09:21 – from 10pm as well if you cannot access
00:09:23 – NK ng s dot org then it's better to
00:09:27 – request access with to your IT
00:09:30 – department you will end up with needing
00:09:32 – it any way to search for packages etc
00:09:35 – and you might also end up using it to
00:09:38 – download note packages or not but it's a
00:09:40 – good thing to do at this moment to ask
00:09:43 – access for it so let's assume that you
00:09:45 – have access to NP MGS dot org if you're
00:09:49 – having problems accessing the HTTPS
00:09:53 – version of NPM jns.org then this
00:09:57 – happened to me in the past you might
00:09:59 – have to basically turn it off so this is
00:10:02 – not recommended but there are situations
00:10:05 – where this is necessary and its I'm
00:10:08 – afraid to say rather frequent so instead
00:10:11 – of using HTTPS the registry use HTTP so
00:10:16 – we don't want to do this on your build
00:10:18 – server this is no long-term solution the
00:10:20 – long-term solution is to check with your
00:10:23 – support team a way to be able to use
00:10:27 – https but if you are just introducing
00:10:30 – angular2 to your organization and you
00:10:33 – want to do I don't know a quick
00:10:34 – prototype you want to show something to
00:10:37 – your balls you want to have it installed
00:10:40 – and take care of the infrastructure
00:10:42 – issue later you don't want to get
00:10:44 – blocked by this this is a way to do it
00:10:47 – initially it's not recommended long-term
00:10:49 – solution of course so you can also say
00:10:53 – at the NPM config of your proxy so you
00:10:57 – can configure npm 2.2 your windows
00:11:00 – corporate proxy and you can try here you
00:11:04 – can get this from your internet explorer
00:11:07 – settings typically there are other ways
00:11:10 – to get your proxy credentials
00:11:12 – many times these will be your windows
00:11:14 – username and password sometimes it's
00:11:16 – different sometimes there's the common
00:11:18 – user that the team will used to go over
00:11:22 – the proxy anyway you need to point npm
00:11:26 – to your proxy you should also point the
00:11:29 – HTTPS proxy and take a look here again
00:11:32 – the someone is trying to turn off https
00:11:36 – by setting the HTTPS proxy to an HTTP so
00:11:40 – unfortunately this is a common situation
00:11:43 – that you might run into you want to
00:11:46 – avoid to turn off https of all costs but
00:11:49 – here is the information in case you need
00:11:51 – it so nvm coffee set proxy HTTPS proxy
00:11:55 – so let's summarize we need to do npm
00:11:58 – coffee set proxy party to your proxy
00:12:00 – config set HTTPS proxy and if this is
00:12:05 – not sufficient you need this also at
00:12:08 – least temporarily and it you might also
00:12:11 – have to point the registry to http
00:12:14 – instead of HTTPS so again their security
00:12:18 – implications so please be aware of them
00:12:20 – and setting at these settings in npm
00:12:24 – might get you through the problem but
00:12:27 – typically you will still have proxy
00:12:29 – problems at this point because the user
00:12:32 – is not your windows users etc if this is
00:12:36 – still the case if you're still having
00:12:38 – proxy problems
00:12:39 – consider the following installing a
00:12:41 – proxy server a small proxy process in
00:12:45 – your local machine that knows how to
00:12:49 – interact with the windows proxy so one
00:12:52 – such proxied so this is just a small
00:12:54 – process that is running in your computer
00:12:56 – is the sea ntlm proxy so this is a very
00:13:00 – small process that is very easy to
00:13:04 – configure
00:13:05 – is just downloadable a zip file so we
00:13:08 – don't need any admin permissions to
00:13:10 – install it
00:13:11 – what you do is you have it running in
00:13:14 – your computer and you configure it to
00:13:17 – point to your windows ce ntlm proxy
00:13:21 – which are proxies that are notoriously
00:13:23 – hard to get around to be able to
00:13:27 – download things from the internet so
00:13:29 – typically if you can access NP MGS dot
00:13:33 – org from your web browser you could in
00:13:38 – principle use the same credentials that
00:13:40 – you have your windows credentials to be
00:13:43 – able to connect your command line tools
00:13:46 – like npm like get you can point them all
00:13:51 – to your see ntlm proxy so let's say that
00:13:54 – you configure proxy to run on localhost
00:13:57 – the 1899 so it would be a matter of
00:14:03 – doing
00:14:04 – npm configset HTTP proxy to your
00:14:08 – development proxy so you would have
00:14:10 – always a development proxy running on
00:14:12 – your computer and your tools interact
00:14:16 – with the development proxy and your
00:14:19 – development proxy forwards everything to
00:14:21 – your corporate proxy because not all the
00:14:24 – tools will be able to interact with all
00:14:27 – the corporate proxies but CNT LM these
00:14:30 – would work if you can view npm in your
00:14:34 – browser you should be able to use any
00:14:36 – command line tool using this proxy
00:14:39 – another proxy this one doesn't have a
00:14:41 – you why if you want a proxy even for
00:14:44 – debugging other things in your computer
00:14:46 – you might need an extra proxy sometimes
00:14:49 – it's not sufficient to have only the
00:14:52 – chrome network tools to debug certain
00:14:55 – scenarios you really want to have a
00:14:57 – debugging web proxy this could be used
00:15:00 – even to debug other processes that are
00:15:02 – not running in the browser like a web
00:15:05 – service that is doing another call to
00:15:07 – another web service you might want to
00:15:09 – see what's going on all over the wired
00:15:11 – so you can install fiedler from telerik
00:15:15 – this is a great tool also that can also
00:15:18 – use this
00:15:19 – the development proxy and take a look it
00:15:21 – does not need the administration rights
00:15:24 – so this is another option install
00:15:28 – development proxy point all the tools to
00:15:31 – the development proxy and point the
00:15:33 – development proxy to your corporate
00:15:36 – proxy once you have a prototype running
00:15:39 – and you have a go to introduce and PM
00:15:43 – know as a tool engl device in your
00:15:45 – organization you can use angular to have
00:15:48 – a running prototype you will eventually
00:15:50 – need a package manager so this is later
00:15:53 – in the adoption stages you will need an
00:15:56 – internal package manager to store
00:15:58 – packages that you want to reuse between
00:16:00 – projects if you cannot get the NPM
00:16:03 – enterprise approved in your organization
00:16:06 – it's very inexpensive it's like twenty
00:16:09 – dollars a month or something it's even
00:16:11 – less than that but in last case you have
00:16:14 – here is a nokia so this is a fork of the
00:16:18 – NPM repository server that is basically
00:16:22 – it doesn't use the couch TV database
00:16:25 – this just uses the file system but a lot
00:16:28 – of companies use it as an internal
00:16:30 – solution for storing their NPM packages
00:16:34 – so ideally it would be better to get npm
00:16:38 – enterprise approved because it's the
00:16:40 – official repository and you have you
00:16:42 – would have your own npm installed i will
00:16:46 – open it here actually and he ran p.m.
00:16:48 – enterprise so this is where this is the
00:16:53 – official repository like 10pm the it's
00:16:57 – really not expensive i don't remember
00:16:59 – the price but have a look at it it's a
00:17:02 – great solution and you can configure
00:17:04 – security rules like we can only install
00:17:07 – angular these angularjs this version
00:17:12 – because these other version might have a
00:17:14 – security issue that you want to make
00:17:15 – sure that nobody in your organization is
00:17:18 – using can configure those type of rules
00:17:20 – in this enterprise proxy repository can
00:17:23 – store NPM packages to share between
00:17:26 – projects
00:17:28 – you can fork open-source libraries and
00:17:31 – apply a patch and deploy it in your
00:17:34 – applications while you are waiting for
00:17:37 – an official match to be released so it
00:17:39 – opens up a lot of flexibility and this
00:17:42 – will probably be eventually needed in
00:17:44 – your organization so i would say NP MGS
00:17:47 – enterprise is a good solution
00:17:50 – it's a self hosted solution i think that
00:17:54 – there is a solution to host it also on
00:17:56 – their servers but that is not acceptable
00:17:58 – for most organizations so the middle
00:18:03 – ground is to have signal Pierre several
00:18:07 – companies have been using it and it
00:18:09 – works fine as well it uses the file
00:18:13 – system for storage so it's important to
00:18:15 – keep in mind that so i hope it helps i
00:18:19 – invite you to hit the subscribe button
00:18:21 – to get notified of other videos like
00:18:24 – this have a look at rest of my channel I
00:18:26 – just released the video demoing the ng
00:18:29 – RX dev tools and the time-traveling the
00:18:32 – burger and there's a lot more stuff in
00:18:34 – there that you might want to have a look
00:18:35 – at if you have over to angular diversity
00:18:38 – that I do you will find my website where
00:18:42 – if you want you can subscribe to my
00:18:44 – newsletter so thank you very much for
00:18:46 – watching and talk to you next time


Video Url:
http://youtu.be/qlk-eeGnius

(Visited 159 times, 9 visits today)

Comments

comments