FeaturesCopy heading link to clipboard
Generates an RPM Spec file for your project
Creates a service definition file
Supports configuration using your existing
package.jsonCurrently supports CentOS 7
UsageCopy heading link to clipboard
Let's start with a simple Node.js project:
my-cool-api
鈹溾攢鈹� package.json
鈹斺攢鈹� server.js
0 directories, 2 filesFirst run npm install to install your dependencies:
npm installThis creates the node_modules directory:
my-cool-api
鈹溾攢鈹� node_modules
鈹溾攢鈹� package.json
鈹斺攢鈹� server.js
1 directory, 2 filesRun the speculate command from inside the project directory:
speculateYou've now got an RPM Spec file and a systemd service definition for your project. You'll also notice that your application has been packaged into a tar.gz archive, ready to be built with an RPM building tool like or :
my-cool-api
鈹溾攢鈹� SOURCES
鈹� 鈹斺攢鈹� my-cool-api.tar.gz
鈹溾攢鈹� SPECS
鈹� 鈹斺攢鈹� my-cool-api.spec
鈹溾攢鈹� node_modules
鈹溾攢鈹� my-cool-api.service
鈹溾攢鈹� package.json
鈹斺攢鈹� server.js
3 directories, 5 filesSpeculate is designed to be used at build time, just before you package your application into an RPM. Because of this, we recommend adding the generated files to your .gitignore file:
*.service
SOURCES
SPECS