Giter Site home page Giter Site logo

antiyellow's Introduction

AntiYellow

Blog for book "AntiYellow"

Настройка

Первоначально устанавливаем в каждой папке зависимости. Меняем конфиг на фронте src/configs/global.config.ts

if (import.meta.env.PROD) {
    result = {
        SERVER_HOST: 'https://[server host]:[server port]',
        FRONT_HOST: 'https://[server host]/',
    }
}

Билдим фронт npm run build, затем запускаем через npm run preview(Фронт запускается на 4173 порте) Переходим на бек /backend, тут меняем дб конфиг /configs/db.config.js. Меняем только поля USER, PASSWORD и DB. Далее открываем /common.config.js тут меняем фронтовский url(для корсов).

Далее нужно настроить аватарку пользователя, создаём в корне сервера такую структуру

tmp 
| - files
| - - ... 

Внутри папки files выполняем команду: wget https://img.freepik.com/free-vector/illustration-businessman_53876-5856.jpg Затем mv illustration-businessman_53876-5856.jpg avatar.jpg Запускаем сервер npm start

Заходим в index.js и комментируем следущие строки

db.sequelize.sync({
  force: true
}).then(() => {
  console.log('Drop and Resync Database with { force: true }');
  initial();
});

Поздравляю всё работает =)

antiyellow's People

Contributors

vladislavkori 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.