npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

backend-management

v0.0.106

Published

Squadle Backend Management

Downloads

9

Readme

Backend-Management

Backend-Management is a series of command-line tools and API web server. It leverages several Squadle libraries in over to create servies and tools that are used to run backend processing and to support our Web Portal and mobile applications. The majority of code is written in Coffeescript with some additional Bash Shell scripts.

Requirements

How do I get set up?

To do development and run a local copy of backend-mangagement:

Get a copy from bitbucket

git clone [email protected]:Squadle/backend-management.git

or

git clone https://[email protected]/Squadle/backend-management.git

Install Modules

npm install

How do I start up the api server?

The server is not required to run the command line scripts. The server is use by the web portal (hq.squadle.com) and the mobile applications (Checklist, Workflow, Manager's App) and many of the backend services that run in GCP.

You can start the server in one of two modes, pointing to the Production database or the Development Database

# For Production
coffee server.coffee --production

# For Development
coffee server.coffee --development

How do I run one of the commandline scripts?

There are over 225 command line coffeescript applications in backend-management. Almost all of them have a command line argument interface, which means you can always run any of the coffeescript script with '--help****' and it will show you all the available options for the script.

For Example, to generate a daily email for a specific user:

coffee src/generateDailyEmail.coffee --production --user='-KgLCub0zw5DMP0-Ykdz'

Where is Backend-Management used?

| Platform | Environment | Project | Additional Info. | What is it used for? | | :--------- | ------------- | -------------------- | ------------------------------------ | ---------------------------------------------------------------------------- | | GCP | Production | squad-leader | 2 VMs in an instance group | API for production applications | | GCP | Development | squad-leader | 1 VM in an instance group | API for development to support hq.staging.squadle.com | | GCP | Development | squad-leader | 1 VM in an instance group | API for development to support hq.staging2.squadle.com | | GCP | Production | firebase-squadle | 1 VM called 'backend-management-1' | VM where cron jobs and manual execution of backend-management is performed | | Heroku | Production | backend-management | No dyno | The majority of cron jobs that keep the platform running |

What other Squadle Libraries does Backend-Management use?

Backend-Management makes significant use of two Squadle libraries: squadle-lib-command and squadle-lib-nodejs

General development practise is you should always run the latest version of these libraries. To make sure you are always up to date with the latest Squadle (and third-party) libraries. Perform the following command often:

npm run update

How do I publish / save my changes to backend-management

Backend-management is a regular git repository, you can push your changes into a branch (master or feature-branch) with standard git commands or use the short-cuts (that increment the package version, commit local changes and push to the repo).

Shortcut:

npm run pub

How do I update each of the installations listed above?

Production Squad-Leader Servers

Make sure you have gcloud installed first

./gcp/update-backend-management.sh

Development Squad-Leader Server 1

Make sure you have gcloud installed first

./gcp/update-backend-management-staging1.sh

Development Squad-Leader Server 2

Make sure you have gcloud installed first

./gcp/update-backend-management-staging2.sh

Production Backend-Management-1

ssh to the server via the gcp-console or use gcloud compute ssh --project firebase-squadle backend-management-1

# login as root
sudo su -

# Change directory to backand-management base
cd /root/backend-mangement

# Get latest from repo
git pull

# Install any modules
npm install

Production Heroku

Setup:

You must have the Heroku cli installed and have a Heroku account.

For macos: brew tap heroku/brew && brew install heroku

From your laptop, make sure you are logged into Heroku from the command line.

heroku login

Do a one time setup, where you attach your local repo to heroku for deployment

# Change directory to your location copy of backend-management
cd backend-management

# Create a remote connection between your local copy and heroku servers
heroku git:remote -a backend-management

# Validate the remote connection has been created
git remote --verbose

# you should see something like:
# heroku	https://git.heroku.com/backend-management.git (fetch)
# heroku	https://git.heroku.com/backend-management.git (push)
# origin	https://[email protected]/Squadle/backend-management.git (fetch)
# origin	https://[email protected]/Squadle/backend-management.git (push)

To deploy to heroku:

# long way
git push heroku master

# shortcut
npm run heroku