diff --git a/.circleci/config.yml b/.circleci/config.yml index 78d8a8de9..52013f8d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,19 @@ version: 2.1 +# TODO: +# add build workflow for frontend +# rename server test workflow +# add linting jobs +# run jobs/workflows on correct package changes (not all...) + workflows: version: 2.1 build: jobs: - - test + - test_server jobs: - test: + test_server: docker: - image: 'circleci/node:12' - image: 'circleci/redis:6' @@ -24,6 +30,7 @@ jobs: SESSION_SECRET: 'keyboard cat' STRATEGY_LOCAL: true CANONICAL_URL: 'http://localhost:3000' + # Note: some of these commands need to be run in the server package folder. steps: - checkout - run: diff --git a/packages/server/app.js b/packages/server/app.js index d6ff2122b..4fe3622fe 100644 --- a/packages/server/app.js +++ b/packages/server/app.js @@ -113,10 +113,10 @@ exports.startHttp = async ( app ) => { // Production mode -> serve things statically. else { - app.use( '/', express.static( path.resolve( `${appRoot}/../frontend/dist` ) ) ) + app.use( '/', express.static( path.resolve( `${appRoot}/../packages/frontend/dist` ) ) ) app.all( '*', async ( req, res ) => { - res.sendFile( path.resolve( `${appRoot}/../frontend/dist/app.html` ) ) + res.sendFile( path.resolve( `${appRoot}/../packages/frontend/dist/app.html` ) ) } ) } diff --git a/packages/server/readme.md b/packages/server/readme.md index 25134f3fb..796640e8a 100644 --- a/packages/server/readme.md +++ b/packages/server/readme.md @@ -25,7 +25,7 @@ You can customise your local deployment by editing and filling in a `.env` file. - copy the `.env-example` file to `.env` - open and edit the `.env` file. -## Developing +## Developing The server consists of several semi-related components, or modules. These can be found in `/modules`. Module composition: - an `index.js` file that exposes two functions, `init` and `finalize` (mandatory) @@ -33,7 +33,7 @@ The server consists of several semi-related components, or modules. These can be ## Server & Apps -### Frontend +### Frontend - In **development** mode, the Speckle Server will proxy the frontend from `localhost:8080` to `localhost:3000`. If you don't see anything, ensure you've run `npm run dev` in the frontend package.