Skip to content

Instantly share code, notes, and snippets.

View renjujv's full-sized avatar
🥷
Stealth Mode on

Renju Paul Jose renjujv

🥷
Stealth Mode on
View GitHub Profile
@renjujv
renjujv / README.md
Created July 9, 2020 09:52 — forked from iest/README.md
Setting up environment variables with various shells

What the hell are environment variables?

They're just variables you set on your system that various programs/processes can read. A fairly standard example in javascript circles would be setting your NODE_ENV variable to "production" or "development", altering how node code is executed on your system (for example showing more debug messaging when in development).

With most shells there's a way to set them for the current session, and a way to set them for all sessions. The following is meant to be a guide on how to set env vars in the various shells.

Bash (The default shell on OSX)

Setting for the session:

@renjujv
renjujv / example.md
Created August 13, 2020 08:35 — forked from sdnts/example.md
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});