@alchemycodelab/create-app
Advanced tools
Comparing version 8.0.5 to 8.0.6
@@ -5,7 +5,12 @@ const express = require('express'); | ||
// Built in middleware | ||
app.use(express.json()); | ||
app.use(require('./middleware/not-found')); | ||
// App routes | ||
// Error handling & 404 middleware for when | ||
// a request doesn't match any app routes | ||
app.use(require('./middleware/notFound')); | ||
app.use(require('./middleware/error')); | ||
module.exports = app; |
@@ -9,4 +9,4 @@ const { Pool } = require('pg'); | ||
// eslint-disable-next-line no-console | ||
pool.on('connect', () => console.log('Postgres connected')); | ||
pool.on('connect', () => console.log('🐘 Postgres connected')); | ||
module.exports = pool; |
const app = require('./lib/app'); | ||
const pool = require('./lib/utils/pool'); | ||
const API_URL = process.env.API_URL || 'http://localhost'; | ||
const PORT = process.env.PORT || 7890; | ||
app.listen(PORT, () => { | ||
// eslint-disable-next-line no-console | ||
console.log(`Started on ${PORT}`); | ||
console.log(`🚀 Server started on ${API_URL}:${PORT}`); | ||
}); | ||
process.on('exit', () => { | ||
console.log('Goodbye!'); | ||
console.log('👋 Goodbye!'); | ||
pool.end(); | ||
}); |
{ | ||
"name": "@alchemycodelab/create-app", | ||
"version": "8.0.5", | ||
"version": "8.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25068
53
384
7