Skip to content

Commit

Permalink
feat(api): fix heroku deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Dec 17, 2021
1 parent 64ac24e commit a4dbb44
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 141 deletions.
1 change: 1 addition & 0 deletions Procfile
@@ -0,0 +1 @@
web: node api/build/app.js
1 change: 0 additions & 1 deletion api/Procfile

This file was deleted.

5 changes: 3 additions & 2 deletions api/package.json
Expand Up @@ -65,8 +65,9 @@
},
"scripts": {
"readme": "node misc/readmeData.js | mustache - misc/README.mustache > README.md",
"start": "node src/app.ts",
"dev": "nodemon src/app.ts"
"start": "node build/app.ts",
"dev": "nodemon src/app.ts",
"build": "rm -rf build && tsc"
},
"publishConfig": {
"access": "public"
Expand Down
128 changes: 0 additions & 128 deletions api/src/api.yml

This file was deleted.

5 changes: 0 additions & 5 deletions api/src/app.ts
@@ -1,4 +1,3 @@
import path from 'path'
import express from 'express'
import { forOwn } from 'lodash'
import * as uuid from 'uuid'
Expand Down Expand Up @@ -30,10 +29,6 @@ app.use(
)
app.use(compression())

app.get('/', (req, res) => {
res.sendFile(path.resolve(__dirname, 'api.yml'))
})

app.get('/status', (req, res) => {
res.status(200).json({
status: 'ok',
Expand Down
9 changes: 6 additions & 3 deletions api/tsconfig.json
@@ -1,8 +1,11 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"rootDir": "./",
"esModuleInterop": true
"target": "es5",
"rootDir": "./src",
"outDir": "build",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -89,7 +89,9 @@
"make:init": "make init",
"prepublishOnly": "yarn release:prepare",
"release:prepare": "node scripts/bump-peer-deps.js && yarn changelog",
"version": "yarn release:prepare"
"version": "yarn release:prepare",
"build": "echo 'nothing to do, please use make for available commands'",
"heroku-postbuild": "make packages-build && cd api && yarn build"
},
"workspaces": [
"packages/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/tooltip/src/BasicTooltip.tsx
Expand Up @@ -2,7 +2,7 @@ import { memo, ReactNode } from 'react'
import { useTheme, ValueFormat, useValueFormatter } from '@nivo/core'
import { Chip } from './Chip'

interface BasicTooltipProps {
export interface BasicTooltipProps {
id: ReactNode
value?: number | string | Date
format?: ValueFormat<number | string | Date>
Expand Down

0 comments on commit a4dbb44

Please sign in to comment.