angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.13k stars 1.24k forks source link

Use only backend #2463

Open nschurmann opened 7 years ago

nschurmann commented 7 years ago

I really love this generator but the main thing that holds me back of using this in a production environment is that i need to use it with reactjs. Is there a way to decouple this generator? or at least have some guidelines to implement it with other generators.

Awk34 commented 7 years ago

If you really like the back-end setup of this generator, but want to use a completely different front-end, that's up to you. It's been discussed before, and anything straying away from a 'full-stack angular + node' generator is out of this project's scope. If we wanted to do something like that, we'd have to rename the project. (I'm still not saying that that's entirely impossible)

I don't think it would be too difficult to use React on the front-end instead of Angular, especially with versions 4.x.x+. You'd need to make sure you enable JSX for TypeScript, or the JSX/React Babel plugin. Then I'd start with removing everything in client/app/app.js, and building a React app out from there.

Toub commented 7 years ago

I already used this generator as the base for server-side only backend, especially because its authentication mechanisms.

To do so, I simply removed the client part (and clean package.json + build files).

However, I think that this kind of fullstack generator should be split in 2 parts, because:

nschurmann commented 7 years ago

Totally agree, maybe we can fork this project and use only endpoint generator and the app generator to provide a structure for the app.

Djalmar commented 7 years ago

@nschurmann any fork for endpoint generator ?

Toub commented 7 years ago

You can authenticate the same way this client does. Is the other app also an angular application?

On the client side, you have to do:

Hope that helps.

rvillanueva commented 6 years ago

If anyone's interested, I've started an experimental combination of the angular-fullstack generator (using MongoDB/HTML/SASS) and react-slingshot here: https://github.com/rvillanueva/react-fullstack-starter

It has a few significant changes, like losing the yeoman generator integration for now and the gulp/grunt pipelines in favor of simpler npm commands.

My main goal is to use it as a boilerplate for my own projects, but might be useful for others in saving time dealing with correctly setting up webpack and basic authentication actions.