Skip to content
This repository has been archived by the owner on Oct 24, 2019. It is now read-only.

A simple example that shows how to use server-bridge.

Notifications You must be signed in to change notification settings

dsherret/server-bridge-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

server-bridge-example

This is an example of server-bridge in action.

  • server/src/NoteRoutes.ts - Defines the routes for notes.

  • server/src/index.ts - Configures the server with express and defines the routes.

  • server/src/generateClientSideCode.ts - Used by npm run build to generate the client-side code.

  • client/src/server.ts - The generated code.

  • client/src/main.ts - The client code that uses the generated code.

Setup

Run npm install in both the client and server folders. Make sure port 8082 is open on your local computer.

Run

  1. Start the server by calling:

    npm start
    

    In the server folder.

  2. Start the client by calling:

    npm start
    

    In the client folder.

Then follow the prompts in the client application.

Generating the client-side code

Run npm run build in the server application.

About

A simple example that shows how to use server-bridge.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published