Skip to content

Commit

Permalink
Drop explore page
Browse files Browse the repository at this point in the history
  • Loading branch information
cblanc committed Jan 4, 2023
1 parent 5f9515b commit 2a41c3f
Show file tree
Hide file tree
Showing 14 changed files with 10,426 additions and 5,917 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Postcodes.io regularly ingests and serves the [ONS Postcode Directory](https://g
- [Docker Hub Container Image: Postcodes.io Database](https://hub.docker.com/r/idealpostcodes/postcodes.io.db)
- [Self Hosting: Node.js and PostgreSQL](https://postcodes.io/docs#install-requirements)
- [Self Hosting: Database only - Download and import the raw dataset to PostgreSQL](https://postcodes.io/docs#import-from-pgdump)
- [Explore](https://postcodes.io/explore)
- [Chat](https://chat.ideal-postcodes.co.uk)

## Quick Start
Expand Down
15,909 changes: 10,426 additions & 5,483 deletions package-lock.json

Large diffs are not rendered by default.

315 changes: 0 additions & 315 deletions public/js/mapbox.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/app/controllers/pages_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Handler } from "../types/express";

const config = getConfig();
const ga = config.googleAnalyticsKey;
const mapBoxKey = config.mapBoxKey;

export const home: Handler = (request, response) =>
response.render("pages/home", { ga });
Expand All @@ -13,6 +12,3 @@ export const documentation: Handler = (request, response) =>

export const about: Handler = (request, response) =>
response.render("pages/about", { ga });

export const explore: Handler = (request, response) =>
response.render("pages/explore", { ga, mapBoxKey });
3 changes: 0 additions & 3 deletions src/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ LOG_DESTINATION # Log destination, can be set to file `LOG_DESTINATION=/var/logs
# Google analytics key
GA_KEY

# Mapbox key if you wish to use `/explore` functionality
MAPBOX_PUBLIC_KEY

#Inserts optional prometheus monitoring middleware
# Express-prom-bundle exposes a '/metrics' endpoint which can be queried by prometheus
# This endpoint requires basic auth defined by:
Expand Down
6 changes: 0 additions & 6 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export interface Config {
port: number;
serveStaticAssets: boolean;
defaults: any;
mapBoxKey?: string;
httpHeaders?: Record<string, string>;
prometheusUsername?: string;
prometheusPassword?: string;
Expand Down Expand Up @@ -111,7 +110,6 @@ export const getConfig = (env?: Env): Config => {

const {
PORT,
MAPBOX_PUBLIC_KEY,
POSTGRES_USER,
POSTGRES_PASSWORD,
POSTGRES_DATABASE,
Expand All @@ -128,10 +126,6 @@ export const getConfig = (env?: Env): Config => {

if (PORT !== undefined) cfg.port = parseInt(PORT, 10);

if (MAPBOX_PUBLIC_KEY !== undefined || !cfg.mapBoxKey) {
cfg.mapBoxKey = process.env.MAPBOX_PUBLIC_KEY || "";
}

if (POSTGRES_USER !== undefined) cfg.postgres.user = POSTGRES_USER;
if (POSTGRES_PASSWORD !== undefined)
cfg.postgres.password = POSTGRES_PASSWORD;
Expand Down
1 change: 0 additions & 1 deletion src/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const routes = (app: Express): void => {
app.get("/ready", utils.ready);
app.get("/about", pages.about);
app.get("/docs", pages.documentation);
app.get("/explore", pages.explore);

app.get("/postcodes", postcodes.query);
app.post("/postcodes", postcodes.bulk);
Expand Down
9 changes: 0 additions & 9 deletions test/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ describe("Pages routes", () => {
.expect(200);
});
});

describe("/explore", () => {
it("should return 200", async () => {
await request(app)
.get("/explore")
.expect("Content-Type", /html/)
.expect(200);
});
});
});

describe("Errors", () => {
Expand Down
Loading

0 comments on commit 2a41c3f

Please sign in to comment.