-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd524a5
commit f2e61c3
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters