ponymusic-wiki
所属分类:博客
开发工具:Svelte
文件大小:0KB
下载次数:0
上传日期:2023-09-22 01:14:29
上 传 者:
sh-1993
说明: 小马音乐维基,,
(ponymusic wiki,,)
文件列表:
package-lock.json (124677, 2023-12-03)
package.json (1078, 2023-12-03)
public/ (0, 2023-12-03)
public/avatar.svg (5882, 2023-12-03)
public/discord.png (5751, 2023-12-03)
public/filter.svg (3286, 2023-12-03)
public/filterActive.svg (3289, 2023-12-03)
public/global.css (1075, 2023-12-03)
public/index.html (397, 2023-12-03)
public/later.png (2220, 2023-12-03)
public/menu.png (174, 2023-12-03)
public/notes.png (1169, 2023-12-03)
public/random.svg (1507, 2023-12-03)
public/rest.png (2124, 2023-12-03)
public/search-icon.svg (2729, 2023-12-03)
rollup.config.js (1859, 2023-12-03)
server.js (34964, 2023-12-03)
server/ (0, 2023-12-03)
server/auth.js (2902, 2023-12-03)
server/conversion.js (3368, 2023-12-03)
server/helpers.js (4196, 2023-12-03)
server/import.js (6938, 2023-12-03)
server/loader.js (914, 2023-12-03)
server/loaderLib.js (4870, 2023-12-03)
server/semaphore.js (600, 2023-12-03)
server/tables.sql (2370, 2023-12-03)
server/update titlecache column.sql (322, 2023-12-03)
server/useful queries.sql (759, 2023-12-03)
src/ (0, 2023-12-03)
src/AlbumImport.svelte (3835, 2023-12-03)
src/AlbumImportTrack.svelte (3065, 2023-12-03)
src/App.svelte (11211, 2023-12-03)
src/CircleSpinner.svelte (1448, 2023-12-03)
src/EditList.svelte (1729, 2023-12-03)
src/FilterButton.svelte (540, 2023-12-03)
src/FilterPopup.svelte (10665, 2023-12-03)
src/Grid.svelte (6916, 2023-12-03)
src/ImportTools.svelte (4973, 2023-12-03)
... ...
Pony Music Wiki
=====================
This is some code to try to create a wiki-like database to keep track of music within the MLP fandom.
It's basically a glorified spreadsheet that anypony can edit.
Setup
==============
Postgresql
-------------------
The project uses [postgresql](https://www.postgresql.org/) as its server.
Make sure to install it prior to setup.
You will need to put the following information
in an .env file in the same directory as server.js
```
PORT=80
# Database
PGHOST=
PGPORT=
PGDATABASE=ponymusic
PGUSER=
PGPASSWORD=
```
On a local instance, there is no need to have OAuth2 authentication, however, a valid session is still needed.
A test user and session can be created by running the following SQL on your database instance
```
INSERT INTO users (id, name, role) VALUES('1', 'System', 2);
INSERT INTO sessions (session, user_id, expire_time) VALUES ('1', '1', NOW() + interval '1 year');
```
Running from source
----------------------
```bash
npm install
npm run dev
```
Allowing
----------------
If you want to allow anyone to have readonly access to the POSTGRES daetabase, consider adding a user like octavia.
SQL:
```
CREATE ROLE octavia WITH LOGIN
NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL 'infinity';
GRANT CONNECT ON DATABASE ponymusic TO octavia;
GRANT USAGE ON SCHEMA public TO octavia;
GRANT SELECT ON tracks, track_tags, track_tags_metadata TO octavia;
```
In postgresql.conf:
In pg_hba.conf:
```
host ponymusic octavia 0.0.0.0/0 trust
```
Sidenotes
===============
This code is based off of a a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template.
To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):
```bash
npx degit sveltejs/template svelte-app
cd svelte-app
```
近期下载者:
相关文件:
收藏者: