dulimarta / spherical-easel

https://spherical-easel.vercel.app
Other
3 stars 7 forks source link

Spherical Geometry

Prerequisite for Building/Compiling the app

  1. Download and install NodeJS. Verify that node and npm are installed correctly by typing

    node -v        # Version 10.16.3 (or newer)
    npm -v          # version 6.13.2 (or newer)
  2. Download and install Bun. Verify bun installation by typing

    bun -v         # version 1.1.x (or newer)

Setting Up for Development

In the project top directory. Type bun install to install external dependencies required by the project. This command must be run when you try to build the project for the first time.

# Install external dependencies (required for the first time)
bun install

Compiles and hot-reloads for development

# Start the app on a local server
bun app:serve
# Start both the app server and vitepress server
bun serve

After typing bun app:serve, use your browser to open localhost:8080 (or whatever port number indicated by bun).

Optional commands

bun build        # to build for production
bun docs:build   # to build the documentation

Documentation

The docs subdirectory is reserved for documentation files built using VitePress.

To view the documentation page:

bun docs:serve

To build the documentation page:

yarn docs:build    # do this AFTER `bun build`

After a successful document build, you will find a new directory dist/docs.

Local Deployment With Docker Container

  1. Build a docker image from Dockerfile

    docker build --tag DDDDDDDD/easelgeo .

    In order to push the image to Docker Hub DDDDDDDD must be your Docker Hub userid.

  2. (Optional) Push the image to Docker Hub

    docker login -u DDDDDDDD
    # Then enter your password or Docker Personal Access Token
    docker push DDDDDDDD/easelgo
  3. Instantiate a container from the image and run locally

    docker run -it -p 9000:80 DDDDDDDD/easelgeo

    Then open the URL localhost:9000 in your browser