Express 및 Angularjs가있는 Node.js가있는 응용 프로그램을 작성하려고합니다.ExpressJS 통합을 사용하는 AngularJS 및 Node.js
AngularJS가 모든 착륙 요청을 처리하도록 허용 할 수 있습니까? Node.js는 순수하게 API 용입니까? Node.js를 작성 모든 경로는 다음과 같이 될 것입니다 의미 :
app.get('/api/users', users.showAll);
app.post('/api/users', users.create);
app.get('/api/users/fb/:fbId', users.findByFb);
app.get('/api/users/:userId', users.show);
app.put('/api/users/:userId', users.update);
app.del('/api/users/:userId', users.del);
그리고 AngularJS와 자체 예에 의해 URL를 해결 할 수있을 것입니다 localhost/users/Some-Name?
둘을 통합 할 때 따라야 할 모범 사례는 무엇입니까?
또한 AngularJS 및 Node.js 앱을 서로 다른 두 개의 응용 프로그램으로 분리 할 것을 권장합니까? 그리고 그것을 할 수있는 방법은 무엇입니까?
미리 감사드립니다.
@BoxerBucks의 대답은 꽤 있습니다. Express/Angular/Bootstrap/Grunt에 대한 초보자 프로젝트가 있습니다. https://github.com/jimschubert/eab –