Git Product home page Git Product logo

Comments (2)

fahadpf avatar fahadpf commented on May 18, 2024 1

It really seemed like a hectic task to manually update all the URLs after every new pull. To add some ease to my life, I created a bash script that I execute to pull the latest changes from the server and then updating the resource URLs with a single command.

I'm attaching the said script here for other people as a reference.

#!/bin/bash

# Remove any existing changes
echo "Removing any existing changes in the repo..."
git checkout .

# Pull latest changes from the remote
echo "Fetching latest updates from remote..."
git pull

# Update resource URLs
echo "Updating resource URLs in ui/dist/index.html file"
sed -i "s/\/js\//\/admin-ui\/js\//g" ui/dist/index.html
sed -i "s/\/css\//\/admin-ui\/css\//g" ui/dist/index.html
sed -i "s/\/favicon\//\/admin-ui\/favicon\//g" ui/dist/index.html

echo "Done"

from socket.io-admin-ui.

darrachequesne avatar darrachequesne commented on May 18, 2024

I think you'll have to edit the index.html file in the ui/dist directory, and replace the reference for the JS and CSS resources:

Before:

<link href="/css/app.64cb6d3f.css" rel="preload" as="style">
<script src="/js/chunk-vendors.d91c80d5.js">

After:

<link href="/admin-ui/css/app.64cb6d3f.css" rel="preload" as="style">
<script src="/admin-ui/js/chunk-vendors.d91c80d5.js">

I'm not sure how we could improve it though.

from socket.io-admin-ui.

Related Issues (20)

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.