mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-15 01:49:10 +00:00
make deployable
This commit is contained in:
parent
eaa1167f16
commit
309aee427e
15 changed files with 317 additions and 886 deletions
|
@ -1,12 +1,14 @@
|
|||
const log = new (require('../logger'))('api/index')
|
||||
const glob = require('glob')
|
||||
|
||||
const PROD = process.env.NODE_ENV === 'production'
|
||||
|
||||
module.exports = async (router, ctx) => {
|
||||
const apis = glob.sync('./api/**/!(index).js')
|
||||
const apis = glob.sync(`./api/**/!(index).js`)
|
||||
log.debug('found apis', apis)
|
||||
|
||||
for (let a of apis) {
|
||||
if (a.endsWith('_test.js') !== null && process.env.NODE_ENV !== 'development') {
|
||||
if (a.endsWith('_test.js') && PROD) {
|
||||
log.debug(`skipping ${a}`)
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue