Giter VIP home page Giter VIP logo

samkenx_epoch-fighters-back's Introduction

Epoch Fighters demo backend

Initialize environment file:

Add file with name .env (it's not a file extension, it's literally a file name) to the root of the application's folder with a content

DB_HOST=mongodb
DB_NAME=epochFighters
SERVER_PRIVATE_KEY=<private key of account with minter role>
RPC_NODE_URL=https://rpc.ankr.com/polygon_mumbai/
CHAIN_ID=80001
CONTRACT_ADDRESS=0xb42C39123017cf9a95cF752eCff09C1893De4d9C

And change placeholder to the private key that you used for deploy contract.

Starting the Application with Docker Containers:

  1. Install Docker for Windows or Docker for Mac (If you're on Windows 7 install Docker Toolbox: http://docker.com/toolbox).

  2. Open a command prompt.

  3. Run the commands listed in node.dockerfile (see the comments at the top of the file).

  4. Navigate to http://localhost:3000.

Starting the Application with Docker Compose

  1. Install Docker for Windows or Docker for Mac (If you're on Windows 7 install Docker Toolbox: http://docker.com/toolbox).

  2. Open a command prompt at the root of the application's folder.

  3. Run docker-compose build

  4. Run docker-compose up

  5. Open another command prompt and run docker ps -a and note the ID of the Node container

  6. Run docker exec -it <nodeContainerID> sh (replace with the proper ID) to sh into the container

  7. Run node dbSeeder.js to seed the MongoDB database

  8. Type exit to leave the sh session

  9. Navigate to http://localhost:3000

  10. Run docker-compose down to stop the containers and remove them.

To run the app with Node.js and MongoDB (without Docker):

  1. Install and start MongoDB (https://docs.mongodb.com/manual/administration/install-community/).

  2. Install the LTS version of Node.js (http://nodejs.org).

  3. Open config/config.development.json and adjust the host name to your MongoDB server name (localhost normally works if you're running locally).

  4. Run npm install.

  5. Run node dbSeeder.js to get the sample data loaded into MongoDB. Exit the command prompt.

  6. Run npm start to start the server.

  7. Navigate to http://localhost:3000 in your browser.

samkenx_epoch-fighters-back's People

Contributors

sidorovkirill avatar samkenxstream avatar anndro 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.