• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
wolf

wolf

NpmTarHostingExample

Public
Like
NpmTarHostingExample
Home
Code
3
README.md
H
hello-world-package.js
package.json
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/16/2025
Viewing readonly version of main branch: v10
View latest version
README.md

Hello World NPM Package Generator

This project creates a simple "Hello World" npm package that can be installed via URL.

Files

  • hello-world-package.js - HTTP endpoint that generates and serves the npm package as a TAR archive
  • package.json - Template for the npm package's package.json
  • index.js - Template for the npm package's main file
  • README.md - This README file

Usage

The hello-world-package.js file is set up as an HTTP endpoint. When accessed, it will generate a TAR archive of a simple npm package that exports a "Hello World" function.

To install the package directly from the URL:

npm install [url-to-the-http-endpoint]

For example, if your Val Town endpoint is at https://api.val.town/v1/run/username/hello-world-package, you would run:

npm install https://api.val.town/v1/run/username/hello-world-package

After installation, you can use it in your JavaScript code:

const helloWorld = require('hello-world-package'); helloWorld(); // Logs "Hello World" to the console

License

MIT

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.