Assuming you already know what is AWS Cloud9 and are already familier with Angular and Angular Cli, I will jump straight to the steps to create and serve an Angular 7 project right from the Cloud9 IDE.
To reach to the welcome page of IDE, perform following steps.
Target 1: Create your repository and environment.
Target 2: Create the angular project.
To reach to the welcome page of IDE, perform following steps.
Target 1: Create your repository and environment.
- Login to your AWS console using your root credentials.
- Go to IAM and create a new user so that you can use it for AWS CodeCommit and AWS Cloud9. This is highly discouraged to use your root account for all of these purposes. Make sure to either generate password for your newly created account of configure SSH access for the account.
- Go to AWS CodeCommit console and create a new repository and enter repository name and description and click on next. You will be redirected to the repositories list page where you will find your newly created repostiory.
- Now open AWS Cloud9 console and create a new environment. Enter environment name and description and click on next. Here you can either create a new EC2 instance for your environment or connect to an already present environment using SSH. For simplicity lets use EC2 for now. You also need to choose instance type, since you are doing all this for learning purpose you should choose t2.micro which is the first option and the smallest available instance at the moment.
- After creating your new environment you will be redirected to the list of available environments. Find the newly created environment's name and click on Open IDE.
- You will find a terminal window already opened in the AWS CLoud9 IDE. If it is not there open it by clicking on Window >> New Terminal Window or by pressing Alt + t keys.
- Now the first step is to clone your AWS CodeCommit project in this IDE. You can simply use git clone command to clone the project. You can copy the HTTPS URL from your CodeCommit console by clicking on the project name in the console.
- After cloning the project you will find a new folder inside your environment's root folder.
- Now install node by running following command
nvm install node
- Make sure the installed node version is the one that you want. You can check node versions by running following command
nvm ls
- If you want to change this version i.e 11.10.0 run the following command
nvm use 10.11.0
-
Next step is to install Angular Cli on your newly created EC2 machine. Run following command to do so
npm install -g @angular/cli
-
Now generate a new angular project.
ng new MyApp --routing=true
Now you can preview your running application by clicking on the Preview button inside your Cloud9 IDE.
- Now lets commit your skeleton application. Run git status command to make sure you are at the right place and doing right thing. Now you can run git add -A followed by git commit -m "Initial commit" to commit your work.
Nice informative blog, it shares more intresting information. This blog is useful to me.
ReplyDeletePHP Training in Bangalore
PHP Training in Chennai
PHP Course in Bangalore
PHP Training Institute in Bangalore
PHP Classes in Bangalore
AWS Training in Bangalore
Data Science Courses in Bangalore
DevOps Training in Bangalore
DOT NET Training in Bangalore
Data Science Course in Chennai