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

@procore-oss/backstage-plugin-announcements-backend

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@procore-oss/backstage-plugin-announcements-backend

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9K
increased by5.17%
Maintainers
0
Weekly downloads
 
Created
Source

backstage-plugin-announcements-backend

This package is deprecated and no longer maintained. Please use the @backstage-community/plugin-announcements-backend package instead.


This is the backend for the Announcements plugin. This plugin provides:

  • REST APIs for managing announcements and categories
  • Integration with the @backstage/plugin-search plugin
  • Integration with the @backstage/plugin-permission-backend plugin

Installation

Are you looking to install the announcements plugin? See the project's installation guide.

Local development

Setup

# install dependencies
yarn install

# set .env
cp env.sample .env
source .env

# start the backend
yarn start

Database

The plugin includes support for postgres and better-sqlite3 databases. By default, the plugin uses a postgres database via docker-compose. Update the app-config.yaml to use the better-sqlite3 database.

Postgres

The postgres database can be started with docker-compose. Don't forget to copy the env.sample.

# start the postgres database
docker-compose up -d

# stop the postgres database
docker-compose down -v
better-sqlite3

The better-sqlite3 database can be seeded with categories and announcements.

With the backend running,

# runs migrations and seeds the database
yarn db:setup

# or run them separately
yarn db:migrations
yarn db:seed

This will create a local.sqlite file under the db/ directory.

Visit knexjs to learn more about the database migrations and seeding.

API Examples

# get all announcements
curl http://localhost:7007/api/announcements/announcements

# get all categories
curl http://localhost:7007/api/categories
// get all announcements
const response = await fetch(
  'http://localhost:7007/api/announcements/announcements',
);
const data = await response.json();
return data;

FAQs

Package last updated on 27 Dec 2024

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