The generated content is now available in our Node.js static application.
This repository will not be updated. The repository will be kept available in read-only mode.
This generator produces a simple Express-based Node.js server project, with all the ingredients you need for a good start at building a cloud native application. It can be run locally or remotely (e.g. IBM Cloud).
Install Yeoman
npm install -g yo
npm install -g generator-ibm-core-node-express
yo ibm-core-node-express --bluemix='{"name":"<project-name>"}'
Following command line arguments are supported:
--bluemix='{"name":"<project-name>","backendPlatform":"NODE"}'
.- You will need at least a project name to run it locally.
- You can alternatively supply a local file containing compatible JSON object by using
--bluemix file:path/to/file.json
Here is a list of the files and folders you receive after executing the generator:
File | Purpose |
---|---|
README.md | Instructions for building, running, and deploying the project |
package.json | JSON file containing project info, scripts, nodemonConfig, and dependencies |
public/* | Folder containing files for server landing page (specifically public/index.html) |
server/* | Folder containing server configuration files (specifically server/server.js) |
test/* | Folder containing JSON files for running code tests (npm test) |
Clone this repository and link it via npm
git clone https://github.com/ibm-developer/generator-ibm-core-node-express
cd generator-ibm-core-node-express
npm link
In a separate directory invoke the generator via
yo ibm-core-node-express --bluemix='{"name":"<project-name>"}'
To run the unit tests
npm test
In order to publish changes, you will need to fork the repository or branch off the master
branch.
Make sure to follow the conventional commit specification before contributing. To help you with commit a commit template is provide. Run config.sh
to initialize the commit template to your .git/config
or use commitizen
Once you are finished with your changes, run npm test
to make sure all tests pass.
Do a pull request against master
, make sure the build passes. A team member will review and merge your pull request.
Once merged to master
an auto generated pull request will be created against master to update the changelog. Make sure that the CHANGELOG.md and the package.json is correct before merging the pull request. After the auto generated pull request has been merged to master
the version will be bumped and published to Artifactory.