git clone https://github.com/stone-payments/pos-mamba-sdk-docs.git
cd pos-mamba-sdk-docs
git submodule update --init --recursive --force
npm i # Install dependencies
npm run dev # Run development
To start a production version of your app, run npm run build && npm start
. This will disable hot module replacement, and activate the appropriate webpack plugins.
To deploy the Mamba SDK Documentation we use Zeit.co Now, so just run:
npm i -g now
npm run deploy
Make sure all dependencies have been installed before moving on:
npm run dev
- Start the project's dev website;npm run build
- Build application atbuild
folder;npm run start
- Start production version atbuild
folder;npm run postinstall
- Install missing/required packages;
To run development https server, you will need generate a Self-Signed, Trusted Certificates for Node.js.
First we’ll need to generate a key and corresponding certificate. Open up Terminal and use the following commands to do this.
openssl genrsa -out localhost.key 2048
openssl req -new -x509 -key localhost.key -out localhost.cert -days 3650 -subj /CN=localhost
If you want to use a host other than localhost then replace every reference to “localhost” above witb your custom domain.
In order to make the self-signed certificate trusted we need to accept it as a valid certificate on our machine. Doing this will replace red warning (“Unsecured”) notices with a green lock, fully replicating a https/SSL website on localhost for testing.
- Open the “Keychain Access” application, in Finder > Applications > Utilities
- Drag and drop the cert file into the application window
- Select “Always Trust” in the dialog box which appears, or alternatively double click on the certificate with the name localhost under the “Certificates” category
- Restart your browser and open up https://localhost to see your trusted, SSL localhost setup in action