
Show HN: Noderize – Create Node apps in 30 seconds - CraftThatBlock
https://medium.com/@cretezy/noderize-create-node-apps-in-30-seconds-2ac1a79baeff
======
Kequc
It seems like a strange set of tooling and I don't get to configure it how I
like.

Why would I want to use Babel to compile server side code rather than just use
the latest version of Node? It's actually doing two compilation steps because
it's got TypeScript in there too, which is also a compiler. It uses Jest for
testing, which is primarily designed for React.

I haven't found my preferred environment scaffolding yet. As I go I find
better and better ways to set up my app and usually it's pretty app specific.
If I did find a great scaffolding tool I think it would be one I have full
control over. Maybe a lot more like Yeoman which has been around for quite a
while.

You can do a lot even without scaffolding, just npm init and git init.

~~~
thangngoc89
Jest isn't primarily designed for React. It has a lot of built in feature for
making testing React components easier. But it's a generic Javascript test
runner and framework

~~~
breeny592
Yep - the main thing that Jest gives out of the box is jsdom, so allows for
dom based testing without needing phantom (or more modern now, headless
browser).

I also find it's faster and has better features than Mocha (for instance,
coverage out of the box).

------
CraftThatBlock
Author here! Let me know of any questions or suggestions for the project.

Quick links:

[https://noderize.js.org](https://noderize.js.org)

[https://github.com/Cretezy/Noderize](https://github.com/Cretezy/Noderize)

------
brianzelip
Just noticed the docs have a tutorial on creating a command line interface
app[0]. Thanks for this. Would love to read the next steps involved in making
the app accessible with with just `fibonacci`, as opposed to `npm start
fibonacci`.

[0][https://noderize.js.org/docs/tutorials-
cli.html](https://noderize.js.org/docs/tutorials-cli.html)

~~~
ludlu
Check out something like pkg by zeit[0] which compiles the node app to a
binary. Then put it in a directory in your $PATH and you'll be able to run it
as `fibonacci`.

[0][https://github.com/zeit/pkg](https://github.com/zeit/pkg)

~~~
CraftThatBlock
The easiest way is simply to use npm's bin, which if installed globally (npm i
-g my-command) is added to path.

~~~
specialist
I’m interested in making binaries, to hopefully ease distributing in-house
utils. Our various projects depend on misc node versions and reinstalling our
utils to each new global bin ain’t fun. If there’s a better way, I’m all ears.

------
partycoder
I do not recommend using npx. Any typo can result in downloading a malicious
package published using a similar name.

~~~
davej
The same is true of `npm install`. Custom lifecycle scripts can be run during
the install process.

~~~
conradk
Adding "ignore-scripts=true" to your ~/.npmrc helps here.

------
numbers
Is there something like this that _is_ a template for server-side node apps?
My experience with node has been small scripts and build configs but I would
love to find a template to start with. Any recommendations are appreciated!

~~~
pranavpr
I created a mostly unopinionated starter project [1] for creating RESTful APIs
using Koa2 and ES2017+ features in a Node.js server environment as well as
providing linting and testing support. It provides the setup for compiling,
linting and testing your code but doesn't make any further assumptions on how
your project should be structured.

[1] [https://github.com/pranavpr/koa2-es2017-api-
boilerplate](https://github.com/pranavpr/koa2-es2017-api-boilerplate)

------
daliwali
From what I understand, it installs a bunch of opinionated packages and then
you're on your own. This isn't the same as "create a useful app in 30
seconds".

------
txmjs
Cool initiative, would be great to see an "eject" command similar to what CRA
provides so that the user can expose all of the configs if they wish.

------
wambotron
While I appreciate the value people get from TypeScript, I do not use it and
would prefer if it were optional (along with babel). Looks ok otherwise.

~~~
CraftThatBlock
It is. You must actually TypeScript support (it's a single option), but it is
turned off by default.

You can also disable Babel (and JavaScript) if running only TypeScript.

------
dr01d
Someone needs to figure out how to do this in 20 seconds and then they would
really have something.

~~~
CraftThatBlock
Most of the time is waiting for npm/yarn to load up! The whole process on a
fast connection is closer to 10s :P

------
diroussel
It’s not clear why one would use this instead of yeoman. Perhaps the docs
could mention that?

~~~
yuchi
Yo is a scaffolder. At the end of the generation you are more or less on your
own. This is a full prepackaged config you can easily upgrade. The cost? Hard
(if not impossible) customizations of underlying products config. Not a con
IMHO.

