Skip to content

caching implementation #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
version: 2
defaults: &defaults
docker:
- image: circleci/python:2.7-stretch-browsers
- image: cimg/python:3.11.0-browsers
install_dependency: &install_dependency
name: Installation of build and deployment dependencies.
command: |
sudo apt install jq
sudo pip install awscli --upgrade
sudo pip install docker-compose
sudo apt update
sudo apt install jq python3-pip
# sudo pip install awscli --upgrade
# sudo pip install docker-compose
sudo pip3 install awscli --upgrade
sudo pip3 install docker-compose

install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
Expand Down
12 changes: 7 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

require('./app-bootstrap')

const bodyParser = require('body-parser')
const config = require('config')
const cors = require('cors')
const express = require('express')
const bodyParser = require('body-parser')
const _ = require('lodash')
const cors = require('cors')
const logger = require('./src/common/logger')
const HttpStatus = require('http-status-codes')
const morgan = require('morgan')
const swaggerUi = require('swagger-ui-express')
const YAML = require('yamljs')
const { closeDB } = require('./src/common/helper')

const helper = require('./src/common/helper')
const logger = require('./src/common/logger')

const swaggerDocument = YAML.load('./docs/swagger.yml')
// setup express app
Expand Down Expand Up @@ -69,10 +70,11 @@ app.use((err, req, res, next) => {

const server = app.listen(app.get('port'), () => {
logger.info(`Express server listening on port ${app.get('port')}`)
helper.initiateCache()
})

server.on('close', async (error) => {
await closeDB()
await helper.closeDB()
logger.info('server closed')
process.exit(error ? 1 : 0)
})
Loading