Integrate Angular2 project into Tomcat server : <p>I've developed a Spring maven rest api for my project. For the client side, I'm using Angular2 with typescript. As new to Angular, referred angular website for the development, using npm and lite-server.</p>

<p><strong>Now I need to make these two separate projects into a single project</strong>, by integrating the html,js,css files into my maven project, to deploy it in Tomcat server.</p>

<p><strong>Project structure</strong></p>

<p>Client side</p>

<pre><code>Project
|__ app
      |_ all app files
|__ node_modules
|__ typings
|__ index.html
|__ package.json
|__ style.css
|__ systemjs.config.js
|__ tsconfig.json
|__ typings.json
</code></pre>

<p>Server side</p>

<pre><code>Project
|__ src/main
        |__ java
        |__ resources
        |__ webapp
                 |__index.html
|__ pom.xml
</code></pre>

<p><strong>All similar posts/blogs, i found suggest to update pom.xml with node etc. But what i need is,</strong></p>

<ul>
<li>Compile the angular-typescript project to js files.   </li>
<li>Produce a set of fully functional html,js,css files.   </li>
<li>Copy them to server webapp folder or whereever they must be.</li>
<li>Running Spring maven project in Tomcat must display my client side index page</li>
<li>Client must work (communicating with rest api) same way when they were two separate projects</li>
</ul>

<p>How this can be done?</p>

<p>Run this command, <code>npm run build</code>, in angular project root folder to create a <code>dist</code> folder, containing production ready client side files. But got this error </p>

<blockquote>
  <p>missing script build</p>
</blockquote>

<p>.</p>
