automated-deployment-aws
Version:
Library that automates the deployment of the current project into aws machine
47 lines (34 loc) • 1.49 kB
Markdown
## automated-deployment-aws
> #### Please use the following command to require the library in any of the project
>
```sh
npm i automated-deployment-aws --save
```
<br />
> #### The above command will create `.awsignore` file at the root of the project. Please add all the files and folders (path to the files and folders) that have to be ignored. Example for the same is below;
>
```sh
node_modules
.gitignore
views/error.jade (To ignore `error.jade` file, which is inside views folder)
README.md
src/.env (To ignore `.env` file inside src folder)
```
<br />
> #### Copy and paste the below line inside `scripts` block in `package.json` file and provide proper values to the keys mentioned;
>
```sh
"deploy": "node node_modules/automated-deployment-aws/index.js config --pemKeyPath=ENTER_PEM_KEY_PATH_HERE --userName=ENTER_USERNAME_HERE --awsIP=ENTER_AWS_IP_ADDRESS_HERE --awsFilePath=ENTER_AWS_FILEPATH_HERE"
```
>
```sh
eg : "deploy": "node node_modules/automated-deployment-aws/index.js config --pemKeyPath=C:/keys/testproject.pem --userName=username --awsIP=3.7.1.236 --awsFilePath=backend/course_user_group"
```
> Please note, In the above command ;
> For `awsFilePath` key, provide the path excluding the root. If you provide `backend/coursegroup` as path, then it will be taken as `./backend/coursegroup`
<br />
> #### Go to the root of the project on `terminal` and run the following command;
>
```sh
npm run deploy
```