- Move your Oracle Jet folder into your ExpressJS API folder
- Or create a new folder for an small ExpressJS application
Delete these in the Oracle Jet app folder:
- the .git folder - use
rm -rf .git - the .gitignore file - use
rm .gitignore
mkdir <project_name>
cd <project_name>
npm init --y
npm install --save express
In a file called index.js do:
const express = require('express');
const app = express();
app.use(express.static("<PATH_TO_YOUR_APP>/web"))
app.listen(process.env.PORT || 3007);Do an ojet build in your web app folder. There should be a web folder.
Ensure the newly created web folder is committed to git & GitHub
"scripts": {
"start" : "node index.js"
}