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

rreadme

v1.1.16

Published

<br/> <div align="center"> <img src="https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/8f2d5c70-8f06-4366-ae29-1a3eb9c7f602.svg" height="96"> <h3 align="center">EdgeOne CLI</h3> </div>

Downloads

1,492

Readme

Overview

EdgeOne Pages is a front-end development and deployment platform built on Tencent EdgeOne infrastructure, designed for modern web development. It enables developers to quickly build and deploy static sites and serverless applications. By integrating edge function capabilities, it ensures efficient content delivery and dynamic functionality expansion, supporting fast access for users worldwide.

EdgeOne CLI can help you manage and debug Pages Functions in the project more efficiently.

1. Preparations

  • Create a Pages project in the Console, and clone the repository to Local.

  • Go to the CAM Page to Retrieve SecretKey and SecretId.

If you are a China site user, please go to the corresponding Pages and CAM pages.

2. Quick Start

1. Install

In the cloned project during the preparation stage, you can use npm to install the CLI:

npm install -g edgeone

Use the edgeone -v command to check if the installation is successful. Use the edgeone -h command to view all relevant commands.

2. Log in

Execute the login command and enter your SecretKey and SecretId as prompted to complete the login.

edgeone login

After completing the login, you can use the edgeone whoami command to view the current login account information.

3. Initialize

After successful login, execute the initialization command to initialize the basic environment required by Edgeone Pages in the project:

edgeone pages init

After initialization, a functions folder and sample functions will be generated in the root directory of the project. You can continue to add and develop functions in this folder.

4. Local Development

After completing initialization, enter the local development stage:

edgeone pages dev

Executing the command will start a service on the local port 8088 by default. You can access the sample function via http://localhost:8088/helloworld. Here, the access path is the address path of the function file in the functions folder.

During local development, the service for Pages Functions and the service for the Pages project may run on different ports. In order to allow the Pages project to call functions, you can use a proxy server or reverse proxy to forward requests to the correct port. Here is an example configuration of webpack-dev-server:

module.exports = {
  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:8088', // Local Development Service Address for Pages Function
        chagneOrigin: true,
        pathRewrite: {
          '^/api': '',
        }
      }
    }
  }
}

In this way, use the Fetch API in the Pages project:

fetch('/api/my-functions', {
    method: 'POST',
    body: JSON.stringify({ data: 'example' }),
})

5. Associated Project

If you need to use the Key-Value Storage capability or synchronize the environment variables set in the console to local debugging, you can execute the Associated Project commands, enter the project name as required. The project name here is the one created in the Preparation Work of the Pages project.

edgeone pages link

6. Submit for Deployment

After local development and debugging are completed, push the project code to the Git remote to trigger the CI build and deployment in the Pages backend, completing the entire development process.

References

Pages IntroductionPages Functions

To access the China site documentation, please click here.

Contact

If you need technical support, please contact us.