Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use AWS CodeStar for Angular Applications?

Can anyone let me know how can we configure AWS CodeStar project for Angular applications?

There is no specific project template exists for angular right now. But i see Node.js + Lambda project template is there.

I don't know how it works since i used to deploy the files under dist/ folder to the server whenever i make some changes.

Is it possible to use CodeStar for angular projects?

Thanks in advance!

like image 843
SP-TY Avatar asked Oct 17 '22 09:10

SP-TY


1 Answers

I'm using Angular CLI. Use the Node.js + Lamda template, and have the build generate the public folder.

Go to your .angular-cli.json file, and modify the apps.outDir to "../public" instead of it being "dist"

"apps": [
{
  "root": "src",
  "outDir": "../public", <-- RIGHT HERE (it tells the build where to compile to)
  "assets": [
    "assets",
    "favicon.ico"
  ],
  "index": "index.html",
  "main": "main.ts",
  "polyfills": "polyfills.ts",
  "test": "test.ts",
  "tsconfig": "tsconfig.app.json",
  "testTsconfig": "tsconfig.spec.json",
  "prefix": "app",
  "styles": [
    "styles.css"
  ],
  "scripts": [],
  "environmentSource": "environments/environment.ts",
  "environments": {
    "dev": "environments/environment.ts",
    "prod": "environments/environment.prod.ts"
  }
}

],

like image 183
Chris Cooley Avatar answered Oct 20 '22 20:10

Chris Cooley