https://github.com/jooy2/nodesand
🧪 Quick NodeJS Sandbox provides a template to run or test simple Node.js scripts.
https://github.com/jooy2/nodesand
experiment javascript nodejs sandbox test testing testing-tools
Last synced: about 1 year ago
JSON representation
🧪 Quick NodeJS Sandbox provides a template to run or test simple Node.js scripts.
- Host: GitHub
- URL: https://github.com/jooy2/nodesand
- Owner: jooy2
- License: mit
- Created: 2021-04-21T02:53:31.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-17T00:02:13.000Z (over 1 year ago)
- Last Synced: 2025-03-24T14:45:54.373Z (over 1 year ago)
- Topics: experiment, javascript, nodejs, sandbox, test, testing, testing-tools
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/create-nodesand
- Size: 931 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# 🔠NodeSand
Quick Node.js Sandbox provides a template to run or test simple Node.js scripts. (Require Node 18 or higher)
```shell
Tue Jan 31 2023 09:03:30 GMT+0900 (Korean Standard Time)
==================================================
â ‹ Main function is running...
Hello, World!
✔ Done!
==================================================
50.02708297967911 ms
```
## Features
- Serve static html file
- ESLint (airbnb-base) support
- Observation mode
- Execution time report
## Installation
```shell
$ npm init nodesand
```
## Usage
Before you begin, you need to install the dependent packages.
```shell
$ npm i
```
### Run node script
Source files of node scripts (dev, once, watch) are located in `src/node/index.js`. When all the actions are done, we call `next()` to end execution.
Run the script once with the following command:
```shell
$ npm run once
or
$ npm run dev
```
Run whenever the script file changes with the following command:
```shell
$ npm run watch
```
### Static html serve
Changes in html files as well as node scripts can be displayed immediately in a web browser.
Source files of html files are located in `src/www/index.html`.
To serve a static html file, run the following command:
```shell
$ npm run serve
or
$ npm run www
```
Now you can try opening the html file with `http://localhost:3000`. Any changes will be updated immediately. (requires refresh)
## Contributing
Anyone can contribute to the project by reporting new issues or submitting a pull request. For more information, please see [CONTRIBUTING.md](CONTRIBUTING.md).
## License
Please see the [LICENSE](LICENSE) file for more information about project owners, usage rights, and more.