How to use AWS CodeStar for Angular Applications?

Viewed 1400

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!

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"
  }
}

],

Related