Skip to content

Commit a86be26

Browse files
author
Dom Harrington
committed
Commit current progress
1 parent e5c937f commit a86be26

9 files changed

+751
-5
lines changed

config/config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('configly')();

config/default.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"host": "https://metrics.readme.io"
3+
}

config/localhost.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"host": "http://dash.readme.local:3000"
3+
}

config/package.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "config",
3+
"version": "0.0.0",
4+
"main": "config.js"
5+
}

index.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
module.exports = () => {
2-
// Your code goes here
1+
module.exports = (apiKey, group) => {
2+
if (!apiKey) throw new Error('You must provide your ReadMe API key');
3+
if (!group) throw new Error('You must provide a grouping function');
4+
5+
return (req, res, next) => {
6+
return next();
7+
};
38
};

0 commit comments

Comments
 (0)