-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Configured prettier and a precommit hook * Upgraded to typescript * removed unused type definitions * Generated file declarations * added dockerfile * Updated prettier and eslint configuration * Updated tests and test running script * Upgraded dependencies * Updated type definitions on counties.ts * Added travis CI * Updated travis configuration * Updated travis configuration * Update nodjs version on travis
- Loading branch information
Showing
53 changed files
with
9,366 additions
and
1,434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
env: { | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: "module", | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
rules: {}, | ||
ignorePatterns: ["dockerfile"], | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.lock | ||
dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"semi": false, | ||
"endOfLine": "lf", | ||
"bracketSpacing": true, | ||
"arrowParens": "always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: node_js | ||
node_js: | ||
- lts/* | ||
install: | ||
- npm install | ||
script: | ||
- npm run test -- --coverage | ||
after_success: | ||
- bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ./coverage/lcov.info |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:alpine | ||
|
||
WORKDIR /usr/app | ||
|
||
COPY ./package.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY ./ ./ | ||
|
||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare const app: import("express-serve-static-core").Express | ||
export default app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const express_1 = __importDefault(require("express")); | ||
const country_1 = __importDefault(require("./routers/country")); | ||
const counties_1 = __importDefault(require("./routers/counties")); | ||
const app = express_1.default(); | ||
app.get("/", (req, res) => { | ||
return res.json({ test: "Server is running" }); | ||
}); | ||
app.use("/api/v1/country", country_1.default); | ||
app.use("/api/v1/counties", counties_1.default); | ||
exports.default = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export declare const country: { | ||
total: number | ||
male: number | ||
female: number | ||
intersex: number | ||
populationIn2009: number | ||
popChange: number | ||
households: number | ||
averageHouseholds: number | ||
popDensity: { | ||
landArea: number | ||
density: number | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.country = void 0; | ||
exports.country = { | ||
total: 47564296, | ||
male: 23548056, | ||
female: 24014716, | ||
intersex: 1524, | ||
populationIn2009: 512690, | ||
popChange: 108551, | ||
households: 12143913, | ||
averageHouseholds: 3.9, | ||
popDensity: { landArea: 9123, density: 68 }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface Details { | ||
male: number | ||
female: number | ||
intersex: number | ||
households: number | ||
averageHouseholds: number | ||
popDensity: { | ||
landArea: number | ||
density: number | ||
} | ||
} | ||
export interface County { | ||
[key: string]: Details | ||
} | ||
export declare const counties: County |
Oops, something went wrong.