Yeoman and ExpressJS

2020-05-20 03:21发布

I want to know if there is some boilerplate code to use a frontend workflow tool like Yeoman with a backend framework like ExpressJS, if I want to maintain the same codebase for both the front and back ends.

Basically I want to know -

  • How do the boilerplate code produced by yeoman and express fit in together. Is there a way to integrate the two? (How does the gruntfile fit into the express project)

  • Can I substitute yeoman's default watch with an express server which reloads pages on update?

6条回答
2楼-- · 2020-05-20 03:35

No, actually there isn't any right now.

But you can combine express.js with the component package manager. There is some work left, and you cant use yeoman components in component.

To answer your questions

  • You can look for components in the component repo that you have used in yeoman. Not the same, but might be a solution.
  • Use the module supervisor for this. You can get it via npm
查看更多
Lonely孤独者°
3楼-- · 2020-05-20 03:37

It is worth noting there is an express-generator project:

I am going to give it a go - because I'm folling this tutorial - but other than that I cant comment on its value.

查看更多
孤傲高冷的网名
4楼-- · 2020-05-20 03:42

Yeoman is currently focused on front-end app development, but we're going to explore back-end integration in the future.

查看更多
爱情/是我丢掉的垃圾
5楼-- · 2020-05-20 03:53

Yoeman fullstack generator now generates both front end and back end. Other interesting frameworks which do the same are Sails JS and StrongLoop

查看更多
霸刀☆藐视天下
6楼-- · 2020-05-20 03:59

I haven't found an easy way of integrating my own Express + H5BP + Angular + Grunt skeletons into Yeoman, and eventually just settled for creating a repo here: https://github.com/ericclemmons/genesis-skeleton

From what I've read, there are projects underway to add express generators, but eventually stacks are going to get complex enough to where you'll have to maintain your own starter app, rather than generating it.

查看更多
成全新的幸福
7楼-- · 2020-05-20 04:01

There's an experimental branch with yeoman + express.js G+ Yeoman/Express Article

I found yeoman.js to be very cool for rapid prototyping but does require some ramping up to get used to the various tools it's "opinionated" about. I've decided to go over each of the core tools in some vids that are hopefully helpful: yeoman.js related videos

查看更多
登录 后发表回答