Setting up next serverless function
This commit is contained in:
parent
2f12e3a4f5
commit
5a380e7343
|
@ -0,0 +1 @@
|
|||
_
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
node_modules/.bin/pretty-quick --staged
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"wix.vscode-import-cost"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
},
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact"
|
||||
],
|
||||
"search.exclude": {
|
||||
"**/.cache": true,
|
||||
"**/public": true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import express from 'express'
|
||||
import cors from 'cors'
|
||||
|
||||
const app = express()
|
||||
const port = 3000
|
||||
|
||||
import indexRouter from './routes/index'
|
||||
|
||||
app.use(express.json())
|
||||
app.use(cors())
|
||||
app.use('/', indexRouter)
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Price Request App listening at http://localhost:${port}`)
|
||||
})
|
||||
export default app
|
File diff suppressed because it is too large
Load Diff
|
@ -21,6 +21,8 @@
|
|||
"test": "npm run test:format && npm run test:integration"
|
||||
},
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"next": "^12.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.5",
|
||||
|
|
Loading…
Reference in New Issue