Skip to content

Commit

Permalink
Merge branch 'main' into login-page
Browse files Browse the repository at this point in the history
  • Loading branch information
rogershi-dev authored Jul 10, 2024
2 parents b212cee + 64d5a83 commit 835a38a
Show file tree
Hide file tree
Showing 9 changed files with 290 additions and 22 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,7 @@ ehthumbs.db

# Temporary files
tmp/
temp/
temp/

# pm2 config files
ecosystem.config.js
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ git clone https://github.com/Code-For-Humans-School/linkedin-autopost.git

# Navigate to the project directory
cd linkedin-autopost/server
```

Then, create a `.env` file under the `server` folder and add the following entries to it.
```shell
# openai api key: just provide a random string
CHATGPT_API_KEY=sk-proj-thisisarandomtokenf7QIgWwfQx1rxnxpD

# mastodon url: leave it as it is
MASTO_URL=https://mastodon.social

# mastodon token: just provide a random string
MASTO_TOKEN=cE-thisisarandomtokennmGBn4gZFMk
```

Finally, install necessary dependencies and start the server
```shell
# Install dependencies
npm install

Expand Down
5 changes: 4 additions & 1 deletion server/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,7 @@ ehthumbs.db

# Temporary files
tmp/
temp/
temp/

# pm2 config files
ecosystem.config.js
4 changes: 0 additions & 4 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.get('/api', (req, res) => {
console.log(req.path);
res.json({ message: 'Hello from server!' });
});

app.use('/', indexRouter);
app.use('/users', usersRouter);
Expand Down
204 changes: 204 additions & 0 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"express": "~4.16.1",
"http-errors": "~1.6.3",
"jade": "~1.11.0",
"masto": "^6.8.0",
"morgan": "~1.9.1",
"openai": "^4.52.1",
"pug": "^3.0.3"
Expand Down
Loading

0 comments on commit 835a38a

Please sign in to comment.