CReate A Node Application
A CLI tool to create React + Node apps with just one command (batteries included)
npm i -g crana crana init <projectName> [projectFolder]
...and you are ready to go!
This will equip you with all important tools you're going to need to develop powerful applications, for example Live reaload for the server and the frontend out of the box. Webpack, Babel, ESLint, StyleLint, Nodemon etc. etc., all preconfigured out of the box, so that you can focus on the important stuff!
This will fire up the backend and the frontend development server. Just edit files under src and see what happens!
crana init <projectName> [projectFolderName]
The interesting files for you are all located in the src folder. The src folder has three subfolders:
As you can imagine, the client folder contains all files for the React frontend application and the server folder contains all files for the node.js backend. The shared folder contains code you would like to share between client and server. This is a good place for e.g. utility functions, domain logic etc.
Be aware that the server files are not transpiled and thus don't support certain features like ES6 imports. This also the reason why all code in the shared folder must be executable with your current node.js version.
As soon as you bootstrapped a new project, you have an application running with:
- Node.js backend
- React for frontend
Under the hood it uses Webpack, Babel, ESLint and StyleLint with a few other plugins enabling a powerful development workflow.
Windows Linux Subsystem
If you're using Windows Linux Subsystem, eslint will not immediatly work. You need to edit the path under
C: and it should work.
Have a look at CONTRIBUTING.md
Code of conduct
Have a look at CODE_OF_CONDUCT.md