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 🙏

© 2025 – Pkg Stats / Ryan Hefner

siena-backend-msvc-template

v1.0.0

Published

Siena Microservice backend template repository

Downloads

10

Readme

Siena Backend Repository Boilerplate

Installation Steps

  1. Clone the respository
git clone git+https://github.com/siena-ai/siena-backend-msvc-template.git
  1. Create a .env file in the root directory as shown in .env.example.
  2. Install the dependencies
npm install
  1. Launch the server
npm start

Migrations

  1. With every version upgrade, create a folder with version in the migrations folder. Example: For version 2.0.0, make a folder named 2.0.0 in the migrations directory.
  2. Create one js file corresponding to each table in the database.
  3. Run the following command to create the migrations file. This would create a migration file inside the migrations folder. Create the up and down function in this migration file to upgrade to the next version or to undo the changes respectively.
npm run make --name "version_name"

ex: npm run make --name "1.0.0"
  1. Run the following command to apply the migrations
npm run latest
  1. Run the following command to undo the changes
npm run rollback

How to deploy

Manual build Docker image and push to Ecr

.env

File content to run commands. Please put theses to your file

REPO=<image repository uri>
APP_NAME=<image name>
PROFILE=<aws profile name>

You can build and push image to Ecr like below:

sh imageEcr.sh [OPTIONS] COMMAND

For example:

  sh imageEcr.sh auth -> Login with your aws profile

  sh imageEcr.sh build -> Build image, by default latest image

  sh imageEcr.sh release -> Push to Ecr

  sh imageEcr.sh -t <tag> build -> Builds the image with given tag

Local

You can also run Docker locally in your system. Run this command

npm run docker-build

If you want to pass options when running script, you could create .env file and define variables which using in script.

OPTIONS

| OPTIONS | DESCRIPTION | | ------------------ | ------------------------------------------------------------------------- | | -t | --tag | Tag of your docker image (beta, latest, version x.x.x ...) | | -r | --repository | Your aws image repository (You should push same image to same repository) | | -p | --profile | Your aws profile name for ecr | | -n | --name | Image name |

COMMAND

| COMMAND | DESCRIPTION | | ------- | ------------------------------------------- | | release | Push image to aws ecr | | build | Build image with tag version and tag latest | | auth | Login to Aws Ecr with authenticated profile |

If you dont pass no command script only build your image according to given options.

CDK

Install aws cli & Setup profile to your cli.

  • Stick to this doc
  • Then go tou your .aws folder, and open credentials. And add below of default this
[siena]
aws_access_key_id=<your access key>
aws_secret_access_key=<you secret acces key>

Then go to cdk folder and run these commands

First time setup cdk to microservice

  • First go to cdk/bin/app.ts file and here change all nameConvention to the proper one.

  • While changing do'nt change constant values that like arn or cluster names which are.

  • Start Changing from devStack.

    • First create ECR repo on aws.
    • nameConvention: "dev-000-<your cervice>,
    • imageTag: tag of image if you build manually,
    • imageName: here is you ECR repo name,
    • apiHealthPath: the health path of service,
    • apiPathPattern: [path pattern for all pathes],
    • targetPriority: Count services and here put the number of your service, such as if there is 4 services before the new one, then put here 5.,
    • serviceDesiredCount: The count of services for app,
  • Then move to proxyData.

    • Change nameConvention: "dev-000-<your cervice>,
  • Then move to cicdData.

    • Change nameConvention: "dev-000-<your cervice>,
    • imageTag: the tag of image if first time,
    • imageName: your image ecr repo name,
    • githubRepository: repo name of your service,
    • branch: branch that you want ci/cd
  • Then check your envs in mesh-stack.ts and mesh-stack-cicd.ts files that are from getting Secrets manager. You should create Secrets manger secret for you service and change the name from this two files that are used with your new secret name.

  • After you done it. The run below commands.

  • cdk synth --profile siena --all run to synthesize the cdk.

  • cdk diff --profile siena --all check the diff from old version.

  • cdk deploy --profile siena --all deploy app to aws.

  • Disclamer: Not run cdk destroy --profile siena --all because it removes whole infrastructure and makes app down. If needed contact [email protected] or [email protected].