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

portal-service

v2.24.0

Published

📘 There are lot of information about Portal Service in the [Portals 2.0 knowledge-base](https://nimbus.nimbusweb.me/space/1hud9hwogrlikxnc/folder/A6RZocScGq6JUVP4).

Downloads

2

Readme

Portal Service

📘 There are lot of information about Portal Service in the Portals 2.0 knowledge-base.

Development

  • You should have NodeJS LTS and Docker installed on your machine.
  • Ensure that your .npmrc is properly configured: https://nimbus.nimbusweb.me/space/1hud9hwogrlikxnc/page/j1rFDie5f9YuFJWk#b4108205607_76. NPM_TOKEN and GITLAB_NPM_TOKEN env variables should be exposed to the shell.
  • Ensure that you're authenticated in the Fusebase Docker registry: https://nimbus.nimbusweb.me/space/1hud9hwogrlikxnc/page/j1rFDie5f9YuFJWk#b4102880193_89
  • Install npm dependencies by running npm install.
  • Enter the rebuild-on-change cycle by running npm run watch.
  • Run cp ./docker-compose.example.yml ./docker-compose.yml. It's hard to cover all the cases that may be needed during development, so you'll most likely need to adjust the configuration for your needs.
  • Set your DB credentials in the docker-compose.yml file.
  • Run cp ./config.local.example.js ./config.local.js
  • Rundocker compose up to start the development environment. NOTE: we should consider to modify docker-compose.yml to read env variables from user's shell.

    Another Docker Compose file docker-compose.develop.yml is needed only for Nimdev that isn't configured properly for this repository at this moment (Jul 3, 2024).

  • After making changes to the source code, you can restart the service by running npm run docker:local:restart.

Custom Domains for Portals Using Cloudflare

Portal admins are able to set custom domains for their portals.

At the date of Jul 2, 2024, the aws option is used for PROD environment at AWS, and the cloudflare for the new DEV environment at Google Cloud. In this paragraph we describe the cloudflare option. Feel free to remove this note after PROD migration to Google Cloud.

Configuration

  • [ ] At first, you should have a domain registered in Cloudflare.

  • [ ] You should set the Fallback Origin in order to use the Custom Hostnames Cloudflare feature.

    • At Cloudflare admin console home page select the account.
    • Click Websites at the left sidebar and select the domain.
    • Navigate to SSL/TLS -> Custom Hostnames
    • Ensure that you have configured Fallback Origin e.g. cname-portals.dev-thefusebase.com
  • [ ] In order to use custom domains for Portals, you need to set the following configuration params:

  • CNAME_TYPE=cloudflare

  • CLOUDFLARE_ZONE_ID=<your_zone_id>. You can find it in the Cloudflare admin console, in the Overview tab for selected domain. Right hand column in the API section.

  • CLOUDFLARE_API_TOKEN=<your_api_token>. You can create a new token in the Cloudflare admin console, in the My Profile tab, API Tokens section. You need to create a token with the following permissions:

    • Zone : Zone Settings : Read
    • Zone : SSL and Certificates : Edit
    • Select the specific zone you want to manage

🛠️ Operations

CLOUDFLARE_ERROR code in the service logs or portals table failure column.

CLOUDFLARE_ERROR code is used to indicate that the custom domain is not configured properly.

You can try to get more error details by following these steps:

  • At the Cloudflare admin console admin console select the account.
  • Click Websites at the left sidebar and select the domain.
  • Navigate to SSL/TLS -> Custom Hostnames
  • Find the custom hostname in the list and click on it to see the details.

Useful Resources