Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generator-loopback-postgresql

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-loopback-postgresql

Loopback+PostgreSQL generator

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Loopback-PostgreSQL generator

Description

Loopback-PostgreSQL generator is a [yeoman] (https://github.com/yeoman/generator) package that allows you to scaffold a new REST API loopback project that are using:

  • LoopBack - Node.js REST API framework
  • PostgreSQL - PostgreSQL loopback connector
  • Winston - Logging module that configured to write in DB, logfile and console
  • .env module - Library for .env credentials management
  • DB migrations - Database migration framework for Node.js, settings and commands are described below

Also current boilerplate uses S3 component and SMTP.

Install

  1. Install: npm install -g generator-loopback-postgresql
  2. Install yeoman: npm install -g yo if it isn't exist yet
  3. Run: yo loopback-postgresql

Usage

After project generation you should edit your .env file and setup all correct credentials for your services.

.env

BUCKET=default.bucket.name
BUCKET_KEY=bucket.key
BUCKET_KEY_ID=bucket.id

RDS_HOSTNAME=localhost
RDS_PORT=5432
RDS_DBNAME=dbname
RDS_USERNAME=postgres
RDS_PASSWORD=postgres

SMTP_HOST=smtp.host.name
SMTP_USERNAME=smtp.user.name
SMTP_PASSWORD=smtp.password

DEBUG=*

Loopback Debug values

Migrations

You have an ability to work with migrations. Before start you must edit settings for this module. ./migrations/database.json A new application has a few scripts for db migrations:

npm run migrate up

The up command executes the migrations of your currently configured migrations directory.

npm run migrate down

The down command executes the migrations of your currently configured migrations directory.

npm run migrate reset

The reset command is a shortcut to execute all down migrations and literally reset all migrations which where currently done.

npm run migrate create

The create command creates templates for you, there are several options for this.

Directory of migrations by default is located at: ./migrations/

Further information about db migrations you can find on this page.

Keywords

FAQs

Package last updated on 07 Dec 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc