Git Product home page Git Product logo

cfsolana.com's Introduction

CF Solana API

This is the development repo for Solana API integrated with Adobe ColdFusion.

Running Locally

Prerequisites

  1. Docker or other container virtualization software.
  2. Postman - We will use this to test the API's. Download and import our specific CF Solana Snapshot.
  3. A Solana account is needed to call the Solana API. Download a Solana wallet such as Phantom to create a new account and receive a wallet address.

Getting Started

  1. Clone this repository down to your computer.
  2. chmod +x install.sh
  3. ./install.sh
  4. Wait a few minutes. The install script is running the full docker setup and the Lucee server can take a few minutes to fully initialize.
  5. Open web browser to localhost:8080
  6. Follow through the ContentBox wizard to setup the first user of the CMS.
  7. Use a tool like Postman to query the APIs.
  8. Note: for most API calls you will need to authorize through the User login route, using the username and password signed up with on the ContentBox wizard.

Troubleshooting

Question: How do I do local development?

Answer: We are mounting the necessary files needed for development in to the docker container via volume mount points. You can see specifically what we are mounting in bin/docker-compose.yml under the cf-solana service's volumes section. When this container is running, the files mounted from the local file system are automatically synced to the docker container file system. These changes are synced both ways, so a change made on the local filesystem will update in docker and updates in docker will update on local filesystem. This will only happen for the files mounted.

Question: Where are the database and container environment variable configurations?

Answer: The MySQL environment variables are set in bin/.env that are then used in the bin/docker-compose.yml to be passed in to the docker containers for initialization.

Question: How do I manually restart the ColdBox server from within the docker container?

Answer: Navigate to the installation directory, in our case that is /app. From there, run box to initialize the ColdBox REPL. Then, once it is loaded you should see the commandbox the welcome message. Run server stop to stop the server. You can verify what the status of the server is by running server list. Then, to restart the server run server start host=0.0.0.0 port=8080 openbrowser=false verbose=true. It is important that the server is run on 0.0.0.0 so that it is accessible to outside of the container without using something like NGINX.

Question: How do I enter a docker container from the command line?

Answer: First will need to list out all the running docker containers with docker ps. Find the container that want to enter and look for the name under the NAMES column. Then, run docker exec -it <container_name> /bin/bash. You will be moved into the docker container and can run commands from that system.

Question: How do I remove the development docker setup once I am done?

Answer: We included a tear down script cleanup.sh in the bin folder that will tear down everything, including the docker volumes. You can also manually stop the containers by name through Docker.

cfsolana.com's People

Contributors

mwilc0x avatar jeff-chastain 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.