Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.12 KB

README.md

File metadata and controls

50 lines (37 loc) · 1.12 KB

stm-express-backend

Backend for simple task manager using the power of ExpressJS, jsonwebtoken and mongodb as database

Download the frontend you prefer which designed for You should read stm before start using this backend

Installation

# Clone this repository
git clone https://github.com/blacktoviche/stm-express-backend
# Go into the repository
cd stm-express-backend
# Install dependencies
yarn install
# Run the app
yarn start
# In development mode I'm using "forever" for hot loading
yarn run dev

Note

In case you want to use stm-web inside this backend copy everything from stm-web build folder and copy it in the main folder here After that uncomment this in server.js

app.get('/', (req, res) => {
    res.sendFile(__dirname + '/index.html');
})

In that case don't need to enable CORS anymore so in server.js you should comment this

app.use(cors());

and remove CORS module from the app dependencies

# Remove CORS module
yarn remove cors

License

Twitter @SyrianDeveloper