ltfschoen / mudtemplate Goto Github PK
View Code? Open in Web Editor NEWBuild Ethereum DApps with MUD v2 in a Docker container
License: Apache License 2.0
Build Ethereum DApps with MUD v2 in a Docker container
License: Apache License 2.0
In this script, the context is the project root, so shouldn't need to source referring to parent directory and so forth https://github.com/ltfschoen/MUDTemplate/blob/main/docker/docker.sh
Add the following to .env.example and .env
PROJECT_NAME=my-project-new
TEMPLATE=vanilla
LICENSE=MIT
then use in Dockerfile
ENV PROJECT_NAME=${PROJECT_NAME} \
TEMPLATE=${TEMPLATE} \
LICENSE=${LICENSE}
then pass them to the run.sh shell script
https://unix.stackexchange.com/questions/495161/import-environment-variables-in-a-bash-script
docker exec -it foundry ./run.sh ${PROJECT_NAME} ${TEMPLATE} ${LICENSE}
pnpm run dev
(following README instructions), with the anvil server running and all contracts deployed via RPC to 127.0.0.1:8545.const socketHost = ${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${hmrPort || importMetaUrl.port}${__HMR_BASE__};
to instead be const socketHost = '127.0.0.1:8545';
. Relates to vitejs/vite#652 that possibly hasn't been resolved yet and possibly should be re-opened. Unfortunately that doesn't appear to resolve the issue.export default defineConfig({
plugins: [react()],
server: {
port: 3000,
fs: {
strict: false,
},
cors: {
// origin: ["ws://127.0.0.1:8545/", "http://127.0.0.1:8545/", "http://localhost:3000/"],
origin: "*",
// methods: ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE', 'OPTIONS'],
methods: "*",
// allowedHeaders: ['Content-Type', 'Authorization'],
allowedHeaders: "*",
credentials: true,
// exposedHeaders: ['Content-Range', 'X-Content-Range'],
exposedHeaders: "*",
// preflightContinue: true,
// optionsSuccessStatus: 204
},
// hmr: {
// clientPort: 8545,
// port: 3000,
// overlay: true,
// }
// proxy: {
// '/socket.io': {
// target: 'ws://127.0.0.1:8545',
// ws: true,
// },
// },
// strictPort: false,
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.