Skip to content

Commit

Permalink
docs: add readme and license
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceturbes committed Jan 15, 2024
1 parent dd524a5 commit f2e61c3
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
14 changes: 14 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright 2024 Lance Turbes Jr.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the “Software”), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Node.js/Express/React/HTMX Server

This is an example music player server which sends down (partial) views via React + HTMX.

## Getting Started

Type checking is provided via TypeScript + JSDoc annotations. No build step is required to run the server (after
dependencies are installed).

### Prerequisites

- You will need to have Node.js 20 LTS (or newer) installed on your machine. You can download Node.js from
the [official website](https://nodejs.org).
- After installing Node.js, you'll have access to the `npm` package manager for installing the other dependencies.

### Setup

Download the source code and install dependencies using the following commands. Run them one at a time.

```bash
git clone https://github.com/lanceturbes/simple-node-react-htmx.git
cd simple-node-react-htmx
npm install
```

To add music to the server, simply copy/paste your `.mp3` files into `public/music`. Please name your files in
kebab-case, and avoid special characters in the file name.

### Launching

After installing, you can use the following command to run the server:

```bash
npm start
```

This will launch the server on `http://localhost:5000` (if you want, you can change the port variable
inside `src/main.js`).

## License

- MIT License. See `LICENSE.md`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "simple-node-htmx-react",
"version": "1.0.0",
"description": "",
"description": "Simple music player server",
"main": "src/main.js",
"type": "module",
"scripts": {
Expand Down

0 comments on commit f2e61c3

Please sign in to comment.