Giter Club home page Giter Club logo

valaxy-admin-server's Introduction

valaxy-admin-server

Server for blogs using Valaxy

Web app for admin

Desktop app for admin

Api requests

Usage

  1. Install dependencies
pnpm i
  1. Config the server

Create file .env in root path and set config
MONGO_LINK=link for connecting MongoDb mongodb://[username:password@]<host>[:port]/<database>?retryWrites=true&w=majority

MANAGER_USERNAME=username for logging in admin e.g. admin
MANAGER_PASSWORD=password for logging in admin e.g. admin
MANAGER_SECRET_KEY=secret key for generating JWT

BASE_URL=base url, it will be spliced with the image address (Required "/") e.g. http://172.23.107.93:3011/v1/
REDIRECT_URL=redirect after a client is requesting a picture (If this option is undefined, it will response image immediately. Not required "/") e.g. http://127.0.0.1:6543

WHITE_LIST=cors e.g. ["123", "123"] (If this option is undefined, it will allow all requests)

COMMAND=the command to be executed e.g. /root/test/upload.sh (If this option is undefined, it will run git add . git commit -m "chore: update" git push -f)

  1. Create Valaxy under template and use git to push it to github (Remember to use npm and git env is required)

This program is using git push -f to push, so make sure that you have permission to force push and there is no conflict to avoid data loss.

  1. Create folder upload

  2. Start the server

pnpm dev

Notice

  1. Api v1/image with POST will delay inserting image information into the database, which means that you can't read all image information from the database at the first time, especially uploading too many images at one time.

  2. If you upload a file with the same file name within a day, the old file will be overwritten

valaxy-admin-server's People

Contributors

rotten-lkz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.