Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
entix-core
Advanced tools
Readme
Entix-core speeds up the development of Koa APIs by combining the benefits of several technologies to provide basic CRUD capability straight out of the box.
When developing server-side applications from scratch, writing basic CRUD operations takes a significant amount of time. To that end, the Entix Ecosystem
was created to provide developers with tooling that eliminates the need for them to write generic code, allowing them to focus on more difficult aspects of their project. Entix-Core
, as the name implies, is at the core unit of all Entix-Projects responsible for loading and running Entix projects.
$ npm i joi kcors knex koa koa2-formidable lodash objection pluralize sqlite3
index.js
const app = new (require('koa'))
const cors = require('kcors')
const bodyparse = require('koa2-formidable')
const config = require('./config')
const projectPath = require('path').resolve(__dirname, 'src')
global.entix = require('entix-core')(projectPath)
app.use(bodyparse(config.bodyParser))
app.use(cors())
app.use(entix.errodHandler(entix.services.handler))
app.use(entix.router.routes())
app.listen(config.server.port, () => {
console.log('running at:', config.serverUrl)
})
config.js
const { Config } = require('entix-core')
const config = {
server: {
protocol: 'http',
hostname: 'localhost',
port: 3000,
},
crypto: {
secret: '{{cryptoSecret}}',
algorithm: '{{cryptoAlgorithm}}'
},
ws: {
cors: { origin: '*' }
},
bodyParser: {
multipart: true,
maxFileSize: 5000 * 1024 * 1024
},
jwt: {
access: {
secret: '{{accessTokenSecret}}',
options: {
expiresIn: '{{accessTokenExpiry}}'
}
},
refresh: {
secret: '{{refreshTokenSecret}}',
options: {
expiresIn: '{{refreshTokenExpiry}}'
}
},
},
}
module.exports = new Config(config)
knexfile.js
module.exports = {
/* SQLITE */
development: {
client: 'sqlite3',
useNullAsDefault: true,
connection: {
filename: './store/store.sqlite3'
},
seeds: {
directory: './store/seeds'
},
migrations: {
tableName: 'knex_migrations',
directory: './store/migrations'
},
pool: {
min: 2,
max: 10
},
},
/* POSTGRES */
// development: {
// client: '{{dbClient}}',
// connection: {
// host: '{{dbHost}}',
// port: '{{dbPort}}',
// user: '{{dbUser}}',
// password: '{{dbPassword}}',
// database: '{{dbName}}',
// },
// seeds: {
// directory: './src/db/seeds'
// },
// migrations: {
// tableName: 'knex_migrations',
// directory: './src/db/migrations'
// },
// pool: {
// min: 2,
// max: 10
// },
// },
};
Currently, the Entix Ecosystem
consists of two projects:
Entix Core
: loads and runs Entix projects.Entix CLI
: generates template Entix projects.├── README.md
├── config.js
├── index.js
├── knexfile.js
├── package-lock.json
├── package.json
├── src
| ├── api
| ├── middleware
| └── services
└── store
├── migrations
├── seeds
└── store.sqlite3
directory: 7 file: 7
FAQs
Entix-core speeds up the development of Koa APIs by combining the benefits of several technologies to provide basic CRUD capability straight out of the box.
The npm package entix-core receives a total of 1 weekly downloads. As such, entix-core popularity was classified as not popular.
We found that entix-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.