Skip to content

Instantly share code, notes, and snippets.

View rajasekarm's full-sized avatar
⌨️
Coding!!

Raja Sekar rajasekarm

⌨️
Coding!!
View GitHub Profile
Hi
@rajasekarm
rajasekarm / axios.js
Created April 2, 2019 16:26
axios global config
import axios from 'axios';
const dev = 'http://localhost:4000/api';
const prod = 'http://your_prod_url/api';
const baseURL = process.env.NODE_ENV === 'production' ? prod : dev;
const axiosInstance = axios.create({ baseURL, timeout: 30000 });
axiosInstance.interceptors.request.use((config) => {
return config;
describe('routes : topics', () => {
beforeEach((done) => {
this.topic;
sequelize.sync({force: true}).then((res) => {
Topic.create({
title: 'JS Frameworks',
description: 'There is a lot of them'
})
.then((topic) => {
web: node src/server.js
@rajasekarm
rajasekarm / ultimate-ut-cheat-sheet.md
Created March 18, 2016 04:54 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@rajasekarm
rajasekarm / doctype1.html
Last active August 29, 2015 13:58
Doctype explanation
Syntax
<!DOCTYPE [Top Element] [Availability] "[Registration]// [Organization]// [Type] [Label]//[Language]" "[URL]">
1 2 3 4 5 6 7 8
Typical example
<!DOCTYPE HTML PUBLIC “-// W3C// DTD HTML 4.0 Transitional// EN” “http://www.w3.org/TR/html4/loose.dtd”>
1 2 3 4 5 6 7 8