
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
A suite of Rails-style generators for the awesome Bogart framework. Work in progress.
Bogart is an awesome framework, but it currently does not come with a CLI. This module provides a CLI to help you get started quicker and easier with Bogart.
npm install -g bogart-gen
The easiest way to get started in Rails is now the easiest way to get started in Bogart. Just use
bogart new <appName>
This will generate a folder tree that looks like this:
appName |
|__ lib
| |__ apis
| |__ repositories
| |__ views
| | |__ layout.html
| |
| |__ routers
| | |__ hello.js
| | |__ middleware.js
| | |__ static-content.js
| |
| |__ util.js
|
|__ public
| |__ images
| |__ javascripts
| |__ stylesheets
|
|__ db
| |__ migrations
| |__ schema.sql
|
|__ config
| |__ settings.js
|
|__ Readme.md
|__ app.js
|__ package.json
Repositories are the database abstraction layer of a Bogart application. Currently, bogart-gen only supports MySQL. Repos generated with bogart-gen will contain a basic CRUD with five functions:
get: // Get an object from the database by it's id
- ```javascript
set: // Create a new entry in the DB, or update an existing one if the object passed to it has an ID
search: // More flexible than list, and return is compatible with GammaGrid
- ```javascript
del: // Deletes an entry from the database
From the CLI, use bogart generate repo <modelName> to generate a repo.
bogart-gen can create Bogart routing files for you so you can get up and running quickly. All API routes generated by bogart-gen will start with '/api/'. These API's will expose all of the repository methods; returns will be in JSON. Generate an API by calling the following from the command line:
bogart g api <modelName>
You'll notice that this uses 'g' instead of 'generate'; this is a convenience provided by bogart-gen, it doesn't matter whether you use 'g' or 'generate'.
With bogart g router <name> [routes], you can generate a router file with a few predefined routes (unless you specify the --lite option). For example, bogart g router post would generate the following file:
var bogart = require('bogart');
module.exports = function (router, viewEngine) {
router = router || bogart.router();
router.get('/posts', function (req) {
});
router.get('/post/:id', function (req){
});
router.post('/post', function (req) {
})
}
With bogart g router post --lite the output becomes
var bogart = require('bogart');
module.exports = function (router, viewEngine) {
router = router || bogart.router();
//Specify routes here
/*Example:
router.get('/post/:id', function (req){
});
*/
}
FAQs
A suite of Rails-style generators for the awesome Bogart framework. Work in progress.
We found that bogart-gen 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
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.