Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a bash start script #58

Open
gbowne1 opened this issue May 5, 2023 · 2 comments
Open

Add a bash start script #58

gbowne1 opened this issue May 5, 2023 · 2 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@gbowne1
Copy link
Owner

gbowne1 commented May 5, 2023

this would be the contents of the file

#!/bin/bash

# Start mongod
mongod &

# Change to server directory and start server.js
cd src/server
node server.js & index.js

# Change to client directory and start index.js
cd ../client
node index.js & app.js

the user would have to chmod +x start.sh and run it with ./start.sh

@gbowne1 gbowne1 added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels May 5, 2023
@gbowne1 gbowne1 added this to the Backend milestone May 5, 2023
@jzunigarce
Copy link
Collaborator

I don't see the index.js file on the server, however the app.js file exists but it doesn't do anything or return. If you want to use it, you can separate the server from the application (express), otherwise we could remove it

@gbowne1
Copy link
Owner Author

gbowne1 commented May 6, 2023

Both the server and the client can have a separate app.js, aside from both also having index.js and server.js.

app.js on the server side is basically a controller for the server.js and the servers global index.js file.

Our current nodemon setup picks up index.js and server.js when it starts. It can also watch the client side index.js and app.js at the same time (thats what create react app's nodemon does) just requires a different setup.

Server side and client side app.js can hook up to the html files as script tags. The app.js isnt returning anything as it is a quiet script in the background loaded in a few of the html files the same as index.js. its incomplete right now but they work.

@gbowne1 gbowne1 added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers question Further information is requested and removed bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
Development

No branches or pull requests

2 participants