DanWahlin / Angular-JumpStart

Angular and TypeScript JumpStart example application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem deploying this app on local tomcat

kakumanuanil opened this issue · comments

Hello @DanWahlin ,

I am trying to deploy this app on my local tomcat by copying the contents of the dist folder upon running ng build --prod into another myApp folder in webapps of my tomcat folder. I keep running into this issue with the internal api calls. Appreciate if you could help me get through this issue.

Request URL: http://localhost:8080/api/customers/page/0/10
Request Method: GET
Status Code: 404 
Remote Address: [::1]:8080
Referrer Policy: no-referrer-when-downgrade
Content-Language: en
Content-Length: 1113
Content-Type: text/html;charset=utf-8
Date: Thu, 21 Feb 2019 17:51:57 GMT
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Authorization: 49a5kdkv409fd39
Cache-Control: no-cache
Connection: keep-alive
Host: localhost:8080
Origin: http://evil.com/
Pragma: no-cache
Referer: http://localhost:8080/myApp/customers
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Thanks..

This app has a RESTful service it calls that is written in Node (that's why npm start is called rather than ng serve to launch it locally). You'd have to deploy the Node service as well (and enable CORS since it'd be running on a different port doing it that way) or convert the service (code is in server.js) to Java. I'm not going to be able to help with that part of it since it's outside the scope of this project, but hopefully that gets you started.